Skip to main content
GunkutA
Associate III
Oct 5, 2020 11:22 AM UTC
Solved

STM32F103 standby High Impedance problem

Hello I need to use standby mode for my MCU which is STM32F103. In datasheets it says that when MCU is in the standby mode, pins are left in the High Impedance. However, I need these pins to be High ( these are output pins). Is it possible to achieve that? Or should I go with sleep mode or maybe low power consumption mode?

Edit : And are there any coding examples for STM32F1xx to show how to enter Low Power Sleep Mode? Such as this one:

https://www.digikey.com/eewiki/display/microcontroller/Low-Power+Modes+on+the+STM32L0+Series#:~:text=The%20STM32L0%20devices%20implement%20five,%2C%20and%20wake%2Dup%20sources.

This topic has been closed for replies.
TDK
TDKBest answer
Oct 5, 2020 1:00 PM UTC

>  However, I need these pins to be High ( these are output pins). Is it possible to achieve that?

No, they can't be high while in standby mode.

There are some families where pins can be configured as pullups while in low-power modes, but the STM32F1 is not one of them.

>  And are there any coding examples for STM32F1xx to show how to enter Low Power Sleep Mode?

https://github.com/STMicroelectronics/STM32CubeF1/tree/master/Projects/STM32F103RB-Nucleo/Examples/PWR/PWR_STANDBY

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

4 replies

TDK
TDKBest answer
Oct 5, 2020 1:00 PM UTC

>  However, I need these pins to be High ( these are output pins). Is it possible to achieve that?

No, they can't be high while in standby mode.

There are some families where pins can be configured as pullups while in low-power modes, but the STM32F1 is not one of them.

>  And are there any coding examples for STM32F1xx to show how to enter Low Power Sleep Mode?

https://github.com/STMicroelectronics/STM32CubeF1/tree/master/Projects/STM32F103RB-Nucleo/Examples/PWR/PWR_STANDBY

"If you feel a post has answered your question, please click ""Accept as Solution""."
GunkutA
GunkutAAuthor
Associate III
Oct 5, 2020 1:10 PM UTC

Thank you for your answer. So it looks like it is my best bet to use Low Power Sleep Mode. It says before I put MCU into LPSleep, I need to set system clock to 131 khz. But I cannot do it in run time. And from the link I couldn't find any example about LPSleep mode. May you share any example related to LPSleep if there is any? And how can I change the system clock to 131 khz while run time, before putting MCU to LPSleep mode?

TDK
Oct 5, 2020 1:40 PM UTC
"If you feel a post has answered your question, please click ""Accept as Solution""."
MM..1
Super User
Oct 5, 2020 4:17 PM UTC

I mean you need STOP mode