cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL I2C recovery after stop-2 sleep mode

Darcy1
Associate II

We have STM32WL working well on LoRa together with Teseo-liv3f Nucleo boards. We now need to have it to sleep for low power between tasks.

Our software is based on the LoRaWAN_AT_Slave example. In there we can allow everything to go into sleep mode 2. Hwever we find that after coming out of sleep mode the I2C bus used for the Teseo-liv3f remains in a busy state, the clk and data lines are both high so not busy, we have also tried a delay before access but still no go. Are there any issues with this?

1 REPLY 1
YBOUV.1
Senior

Hi @Darcy​ ,

you may find relevant info at:

https://community.st.com/s/question/0D53W00000m0rYzSAI/why-does-power-management-corrupt-spi-registers-on-stm32wle5

Still in stopmode 2, the i2c Ip registers are not retained (e.g. registers value are lost) and must be reinitisialed at stop2 exit ( you can add your code here in stm32_lpm_if.c > PWR_ExitStopMode())

In sleep mode, every is retained and nothing has to be done at sleep exit