Showing results for 
Search instead for 
Did you mean: 

how to implement Sleep mode

Associate II

I am using a STM32L431KCU6 microcontroller and reading data from I2C every 90ms. I would like to implement a sleep mode to achieve lower power consumption, I am using timer6 which generates an interrupt every1ms for system run time. I was thinking I can change the timer period to be 90ms prior to put the device on sleep and when TIM6 interrupt happens (wake up the processor) I can change the period to 1ms for normal operation.  is this possible? and how can I achieve this? 

I don't have any experience in using sleep mode but I have been reading similar questions and I've seen WFI coming up very frequently.  Is there any example codes available? or documentation which can assist in writing code? 


Thanks in advance and appreciate any help.


Kind Regards

Manpreet Singh