Sleep Mode Operation

The tamper detection will continue to operate in any sleep mode where the source clock is active. The tamper interrupts can be used to wake up the device from a sleep mode. Tamper events can trigger other operations in the system without exiting the sleep mode.

An interrupt request will be generated after the wake-up if the Interrupt Controller is configured accordingly. Otherwise the CPU will wake up directly, without triggering any interrupt. In this case, the CPU will continue executing right from the first instruction that followed the entry into sleep.

Standby sleep mode is implemented in this application code. As RTC is capable of running in backup sleep mode, the user can also implement the backup sleep mode but with the following consideration. When backup sleep mode is enabled, the device goes to sleep and the RTC will be running internally. As tamper occurs the device wakes up and resets the controller. The tamper callback will not be executed in this condition. The user can handle this situation by writing a routine inside the main function, which initially checks for the cause of the backup reset. If the backup reset is because of tamper, then the user can execute required actions to be done during tamper detection.