Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to tell if awake or not #37

Open
trullock opened this issue Sep 23, 2024 · 4 comments
Open

How to tell if awake or not #37

trullock opened this issue Sep 23, 2024 · 4 comments

Comments

@trullock
Copy link

Is it possible to know whether the SoC is awake or not from the ULP?

Is there a HULP macro or other way to know?

Thanks

@boarchuz
Copy link
Owner

boarchuz commented Sep 24, 2024

You can use I_GET_WAKE_READY

#define I_GET_WAKE_READY() I_RD_REG_BIT(RTC_CNTL_LOW_POWER_ST_REG, RTC_CNTL_RDY_FOR_WAKEUP_S)

@trullock
Copy link
Author

I saw that, but i read that to mean "its ready to be woken up", not "is already awake"

Is that what it means then?

@boarchuz
Copy link
Owner

Same thing, just invert the logic around it. If I_GET_WAKE_READY is 0 then it means it's not ready to be woken, ie. it is already awake. You can basically read it as "I_IS_SOC_ASLEEP".

@trullock
Copy link
Author

Ah I see, gotcha.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants