Configuring and using RTC GPIOs as outputs in stub

BowensR&D
Posts: 1
Joined: Thu May 04, 2017 3:31 pm

Configuring and using RTC GPIOs as outputs in stub

Postby BowensR&D » Thu May 04, 2017 3:40 pm

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!

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Configuring and using RTC GPIOs as outputs in stub

Postby ESP_Angus » Fri May 05, 2017 1:56 am

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.

Who is online

Users browsing this forum: No registered users and 105 guests