[SOLVED] Microsecond Glitch at Startup / How to Disable IO Re-Initialization
Posted: Fri Oct 16, 2020 12:57 am
BRIEF: How to disable GPIO re-initialization at boot time?
DETAIL:
* We abuse the HSPI bus to output a proprietary protocol on IO pins.
* The protocol requires a normally high state.
* The ESP32 occasionally needs to reboot.
* We want the IO pin to remain in a high state throughout the reboot and re-initialization.
* We observe a 1 microsecond negative pulse during reboot. (See oscilloscope capture below)
* Judging from the slow skew on the rising edge of the pulse, I believe the pin is being set to an INPUT with PULLUP. It then later gets configured for HSPI use without any further glitch occurring.
* Unfortunately, this glitch causes malfunction of the hardware on the other end of this protocol, which we cannot control.
* Therefore, we seek a way to eliminate this negative pulse occurring on reboot.
* I guess that there is some initialization code where ESP-IDF sets all IO pins to input with pull-up. I would want to disable that behavior. Hopefully this can be done from within the IDF. I.e., that it is not an immutable (ROM) part of the boot process.
Any suggestion on avoiding this sort of IO glitch on reboot is much appreciated.
Cheers from Scenic Northern New Jersey,
-Chris
DETAIL:
* We abuse the HSPI bus to output a proprietary protocol on IO pins.
* The protocol requires a normally high state.
* The ESP32 occasionally needs to reboot.
* We want the IO pin to remain in a high state throughout the reboot and re-initialization.
* We observe a 1 microsecond negative pulse during reboot. (See oscilloscope capture below)
* Judging from the slow skew on the rising edge of the pulse, I believe the pin is being set to an INPUT with PULLUP. It then later gets configured for HSPI use without any further glitch occurring.
* Unfortunately, this glitch causes malfunction of the hardware on the other end of this protocol, which we cannot control.
* Therefore, we seek a way to eliminate this negative pulse occurring on reboot.
* I guess that there is some initialization code where ESP-IDF sets all IO pins to input with pull-up. I would want to disable that behavior. Hopefully this can be done from within the IDF. I.e., that it is not an immutable (ROM) part of the boot process.
Any suggestion on avoiding this sort of IO glitch on reboot is much appreciated.
Cheers from Scenic Northern New Jersey,
-Chris