Skip to main content
Darcy1
Associate
April 19, 2021
Question

STM32WL I2C recovery after stop-2 sleep mode

  • April 19, 2021
  • 1 reply
  • 1167 views

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?

This topic has been closed for replies.

1 reply

YBOUV.1
ST Employee
July 16, 2021

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