It has the following other ICs on the board which are power switched to save power during deepsleep mode:
- SPI Digital IO;
- SPI ADC;
- SPI Temperature;
- Serial ICs;
stm.mem32[stm.PWR + stm.PWR_CSR] |= 1 << 8 # enable WKUP pin on PA0.
stm.mem32[stm.RTC + stm.RTC_TAFCR] |= 1 << 0 # Tamper 1 detection enabled PC13.
The problem I am having is as follows:
- If I switch off all of the other ICs in deepsleep mode, when I toggle the PA0 or PC13 pins, the microcontroller immediately wakes up as expected, including from the RTC wakeup;
- If I keep the power enabled for the other ICs and then enter deepsleep mode the microcontroller will not wake up from either the RTC or PA0 or PC13.