cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO state in Shutdown mode

MSimo.1
Associate II

Hey there.

Iam using a L432KC for a simpe periodic SPI communication with another device.

when the communication is done the device is sent to sleep.

and then the MCU goes into shutdown mode with HAL_PWR_EnterSTANDBYMode();

The problem is that the device wakes up after the MCU went to shutdown.

the device wakes up when the NSS line is pulled low. I assume that happens when the mcu goes into shutdown.

ive configured a pullup on the NSS line in the .ioc file of my project.

are theese pullups still active when the mcu is in shutdown mode?

is there annother way to set GPIO pins into a "steady-state" before entering the shutdown mode?

thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> are theese pullups still active when the mcu is in shutdown mode?

No. Details about shutdown mode are in the reference manual. If you want pullup/down to persist in shutdown mode, you will need to configure it for this.

0693W000005Btc7QAC.png

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

> are theese pullups still active when the mcu is in shutdown mode?

No. Details about shutdown mode are in the reference manual. If you want pullup/down to persist in shutdown mode, you will need to configure it for this.

0693W000005Btc7QAC.png

If you feel a post has answered your question, please click "Accept as Solution".
MSimo.1
Associate II

thank you! that is exactly what i was looking for!

i used theese HAL_functions :

HAL_PWREx_EnableGPIOPullUp(PWR_GPIO_B, GPIO_PIN_0); //NSS

HAL_PWREx_EnablePullUpPullDownConfig();

i should do that to all GPIOs wich are configured as a output right?

Does it make any sence to do that to the inputs as well? Pullup oder Pulldown? doesnt matter right?

what about Communication lines like MISO MOSI SCL SDA ?

SCL and SDA have 10k pullups anyway (on my pcb) so should i also use pullups in the config?

SPI_CLK pulldown (because CPOL = 0 ) ?

or are there better commands to disable SPI, I2C and UARTS ?

TDK
Guru

> i should do that to all GPIOs wich are configured as a output right?

> Does it make any sence to do that to the inputs as well? Pullup oder Pulldown? doesnt matter right?

If you want. I don't know your application.

> what about Communication lines like MISO MOSI SCL SDA ?

> SCL and SDA have 10k pullups anyway (on my pcb) so should i also use pullups in the config?

Seems unnecessary if they have external pullups.

> SPI_CLK pulldown (because CPOL = 0 ) ?

Also unnecessary since you're controlling NSS.

If you feel a post has answered your question, please click "Accept as Solution".