rtc_deep_sleep_start() function
Enter deep sleep mode Similar to rtc_sleep_start(), but additionally uses hardware to calculate the CRC value of RTC FAST memory. On wake, this CRC is used to determine if a deep sleep wake stub is valid to execute (if a wake address is set). No RAM is accessed while calculating the CRC and going into deep sleep, which makes this function safe to use even if the caller's stack is in RTC FAST memory.
Arguments
wakeup_opt
- same as for rtc_sleep_start
reject_opt
- same as for rtc_sleep_start
Return value
non-zero if sleep was rejected by hardware
Notes
If no deep sleep wake stub address is set then calling rtc_sleep_start() will have the same effect and takes less time as CRC calculation is skipped. This function should only be called after rtc_sleep_init() has been called to configure the system for deep sleep.
![]()
result = rtc_deep_sleep_start(s_config.wakeup_triggers, reject_triggers);
rtc_deep_sleep_start() is called by 1 function and calls 2 functions:
![]()
rtc_deep_sleep_start()
rtc_deep_sleep_start():
![]()
rtc_deep_sleep_start()