Logic analyzer on ESP32 for self-diagnostics
Posted: Mon May 29, 2023 1:07 pm
Logic analyzer on ESP32 for self-diagnostics
- 16 channels.
- 40 megahertz. - maximum sample rate
- 32764 - maximum number of samples per frame (capture buffer). The volume is limited by the maximum size of free DRAM.
- 1 capture trigger channel. The trigger is organized on interrupts along the fronts. ESP32 interrupts are processed approximately 2 µs - Accordingly, the delay from the trigger to the beginning of the data, about 2 µs. In the latest version, the trigger has been moved to Hilevel interrupts ( level 5 ), the delay from the trigger to the beginning of the data has been reduced to 0.3 μS.
Uses the internal clock of samples, no need to set jumpers to supply sync pulses or use an external generator. Pins for sync pulses are not used.
- The analyzer allows you to work on the measured device. We install the software on the patient, configure the GPIO for channels (checked - GPIO, I2C, LED PWM, IRQ_GPIO, I think that the rest will also work), shows both input and output signals of the patient. Trigger restrictions in this mode - you cannot assign a trigger to a pin (GPIO) that has an interrupt assigned to the patient software (the analyzer will reconfigure itself) - in the latest version (interrupt level 5) the restriction is partially removed, but the trigger will fire on those fronts (levels ) that are assigned to the patient software.
- You can make the analyzer as a separate device, but I don't see much point. There are a sufficient number of cheap analogs with similar characteristics on the market. The main advantage of self-diagnostics is that we linked the software to the project and see what happens there. It is clear that the patient's software can already use the entire DRAM - then the volume of samples will greatly decrease - but we will still see at least the levels and a small number of samples.
https://github.com/ok-home/logic_analyzer
- 16 channels.
- 40 megahertz. - maximum sample rate
- 32764 - maximum number of samples per frame (capture buffer). The volume is limited by the maximum size of free DRAM.
- 1 capture trigger channel. The trigger is organized on interrupts along the fronts. ESP32 interrupts are processed approximately 2 µs - Accordingly, the delay from the trigger to the beginning of the data, about 2 µs. In the latest version, the trigger has been moved to Hilevel interrupts ( level 5 ), the delay from the trigger to the beginning of the data has been reduced to 0.3 μS.
Uses the internal clock of samples, no need to set jumpers to supply sync pulses or use an external generator. Pins for sync pulses are not used.
- The analyzer allows you to work on the measured device. We install the software on the patient, configure the GPIO for channels (checked - GPIO, I2C, LED PWM, IRQ_GPIO, I think that the rest will also work), shows both input and output signals of the patient. Trigger restrictions in this mode - you cannot assign a trigger to a pin (GPIO) that has an interrupt assigned to the patient software (the analyzer will reconfigure itself) - in the latest version (interrupt level 5) the restriction is partially removed, but the trigger will fire on those fronts (levels ) that are assigned to the patient software.
- You can make the analyzer as a separate device, but I don't see much point. There are a sufficient number of cheap analogs with similar characteristics on the market. The main advantage of self-diagnostics is that we linked the software to the project and see what happens there. It is clear that the patient's software can already use the entire DRAM - then the volume of samples will greatly decrease - but we will still see at least the levels and a small number of samples.
https://github.com/ok-home/logic_analyzer