2020-11-18 03:23 PM
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!
Solved! Go to Solution.
2020-11-18 04:15 PM
> 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.
2020-11-18 04:15 PM
> 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.
2020-11-19 12:38 AM
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 ?
2020-11-19 05:46 AM
> 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.