cancel
Showing results for 
Search instead for 
Did you mean: 

Lowpower Modes STM32L4 and RTC

MSimo.1
Associate II

Hey there.. iam currently working with a L432KC on a custom made PCB.

My programm reads a sensor value (I2C) and sends it so another device via SPI.

This operation is performed every minute.

iam using the HAL_Delay(60000) command to wait fot the next minute.

is that a smart and powersaving solution?

what Lowpower modes should i use? my project will be powered through a CR1632 and i want it to last as long as possible. i connected a 32khz xtal as LSE.

HAL_Delay() uses SYSTick as timer right? is that meant by RTC ?

speaking : if i set the controller into the "shutdown" mode (with disables everything). will it be able to wakeup after a HAL_Delay() function?

annother question:

Iam using SPI, I2C and UART when my controller is doing someting (not in sleepmode)

wich power mode should i use then? i cant find SPI in the peripherals table ..

what should i configure in the clock config in the .ioc file?

i dont really get it ... thank you!

10 REPLIES 10
MSimo.1
Associate II

"Put all Peripheral Disabled and not clocked lie ADC, SPI....

Put all GPIO in Analog Mode (to limit current leakage and extra consumption)"

can someone explain what is ment by theese 2 steps?

iam using  HAL_SPI_Transmit() to transmit data over SPI

arent the SPI/I2C/UART peripherals desiabled when i enter the Standbymode?

do i have to deactivate them before i do this?

what is ment by analog mode of the GPIO pins?

is that the function discriped in 5.4.8-19 of RM0394? Registers PWR_PUCRx ?