I’m working on nRF52840’s power management and I want to develop a sleep mode state that wakes the board up from RTC, for example, sleep for 10 seconds and wake up. I successfully managed to put it into a sleep mode using __WFE() “Wait for Event” function, however, the only way I can wake it up is from GPIO event, like pressing a button.
I guess the module has no RTC configuration, so I chose the Z-TIMER for seconds counter. How can I set into sleep mode and wake up on RTC using Z-TIMER?
I have tried calling ZTIMER and __SEV() after __WFE(), also writing direclty into memory, but with no success.