You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when waking from sleep the PSRAM fails to initilize (cannot read ID), which makes sense, the GPIO16 is still held high, and for some reason the PSRAM init function do not disable the HOLD.
However, calling
At the very beginning of the firmware does not solve the problem, i assume the reason is simply that the PSRAM is initilized either in early boot or even in bootloader, so disabling the HOLD afterwards cannot solve the issue.
Since i use the wake stub for other purposes i figured i should disable the HOLD here, and found this macro, sadly the macro wont compile, i assume there is a trick perhaps related to the scope of some structures used in ulp.h, but i could not find anything.
github-actionsbot
changed the title
error in ULP macro I_WR_REG when trying to use I_GPIO_HOLD_DIS in the wake stub
error in ULP macro I_WR_REG when trying to use I_GPIO_HOLD_DIS in the wake stub (IDFGH-10643)
Jul 14, 2023
I think you might be getting some things mixed up here.
ulp.h contains macros intended to be used from the ULP co-processor, while the wake-up stub is code that is ran from the main cpu (but ran at a early stage in the boot up process)
Answers checklist.
IDF version.
v4.4.4
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
PowerShell
What is the expected behavior?
expected that I_GPIO_HOLD_DIS can be used from the wake stub.
What is the actual behavior?
In function 'void esp_wake_deep_sleep()':
Steps to reproduce.
call
I_GPIO_HOLD_DIS((gpio_num_t)16);
in the default wake stub.Build or installation Logs.
More Information.
So, i use ESP32D0WDR2 which has internal 2M PSRAM, just before when entering deep sleep I hold GPIO16 high to avoid a current leak.
However, when waking from sleep the PSRAM fails to initilize (cannot read ID), which makes sense, the GPIO16 is still held high, and for some reason the PSRAM init function do not disable the HOLD.
However, calling
At the very beginning of the firmware does not solve the problem, i assume the reason is simply that the PSRAM is initilized either in early boot or even in bootloader, so disabling the HOLD afterwards cannot solve the issue.
Since i use the wake stub for other purposes i figured i should disable the HOLD here, and found this macro, sadly the macro wont compile, i assume there is a trick perhaps related to the scope of some structures used in ulp.h, but i could not find anything.
Just to clarify, the macro i use comes from here : https://github.com/boarchuz/HULP/blob/63266e18e4b3c09ae840dbf72999a36df67ab746/src/hulp_macros.h#L389
Just a wrapper for ulp.h macros.
The text was updated successfully, but these errors were encountered: