Wake handler GPIO/ADC examples?
-
- Posts: 20
- Joined: Tue Jun 12, 2018 5:05 pm
Wake handler GPIO/ADC examples?
Obviously the wake handler can only use code which is loaded into ROM/RTC memory, but I'm wondering if there are any examples of using peripherals through what limited resources are available in this state. Looking through the header files for the ROM code, I see function to manipulate GPIOs, for example, but there is also a function called "gpio_init()". Do I need to call this? I also don't see any header files for an ADC driver. Do I have no other choice other than direct register operations to manipulate peripherals during the wake handler?
-
- Posts: 20
- Joined: Tue Jun 12, 2018 5:05 pm
Re: Wake handler GPIO/ADC examples?
Another question: What is the best way to find out the wake cause in the stub, given that esp_sleep_get_wakeup_cause() isn't loaded into IRAM?
For right now, I've just been slightly tweaking any higher level functions (GPIO, etc) I need and loading them into IRAM under a new name. I'm trying to avoid having to use the lower level macros, mostly because it's hard to tell what is best practice to use. Is there a better way to do this that I am missing?
For right now, I've just been slightly tweaking any higher level functions (GPIO, etc) I need and loading them into IRAM under a new name. I'm trying to avoid having to use the lower level macros, mostly because it's hard to tell what is best practice to use. Is there a better way to do this that I am missing?
Re: Wake handler GPIO/ADC examples?
It would be nice to have a wake stub library with useful functions in rtc_wake_stub_* files but I don't think it exists yet.
Who is online
Users browsing this forum: No registered users and 130 guests