Hi There,
I'm able to put the esp32 to sleep and wake it up on RTC pin level change. What I need next is a stub function that acts before the processors boot up configuring an RTC pin as output and setting it high until the main tasks take over.
Is there an example out there that does that or could you please point me in the right direction?
Many thanks in advance!
Configuring and using RTC GPIOs as outputs in stub
Re: Configuring and using RTC GPIOs as outputs in stub
There's documentation on how to load the wake stub here:
http://esp-idf.readthedocs.io/en/latest ... -stub.html
To configure RTC GPIOs from wake stub code, it's best to use the ROM functions in rom/gpio.h ie:
https://github.com/espressif/esp-idf/bl ... gpio.h#L77
Because the CPU and the main I/O subsystem have woken at this point, you shouldn't need to worry about the "RTC" part of the RTC GPIOs, just enable the pin as a GPIO output and drive it high.
http://esp-idf.readthedocs.io/en/latest ... -stub.html
To configure RTC GPIOs from wake stub code, it's best to use the ROM functions in rom/gpio.h ie:
https://github.com/espressif/esp-idf/bl ... gpio.h#L77
Because the CPU and the main I/O subsystem have woken at this point, you shouldn't need to worry about the "RTC" part of the RTC GPIOs, just enable the pin as a GPIO output and drive it high.
Who is online
Users browsing this forum: No registered users and 71 guests