What is the state of GPIO pins when microcontroller is in standby mode? Each pin remembers it's own state: input, output, analog, pull-up, logic level on it? Which document (datasheet, etc) and where specifies this behaviour?
STM32F100RC -- GPIO in standby mode?
Mar 31, 2012
3 Replies
The pins don't do what you ask !
From the ST RM0041 Reference manual for the STM32F100
I/O states in Standby mode In Standby mode, all I/O pins are high impedance except: ? Reset pad (still available) ? TAMPER pin if configured for tamper or calibration out ? WKUP pin, if enabled
You can download it from the ST website.
Michael Kellett
But they do...
I am putting microcontroller in standby mode with code listed below. LED is turned on before entering standby mode. And then microcontroller enters standby mode LED is not turned off (and no flashing -- CPU sleeps).
And because by default all microcontroller pins configured as digital inputs consuming current increases when I move hands close to microcontroller.
What I doing wrong?
Code:
GPIOA->BSRR=GPIO_BSRR_BR8; // LED is on
SCB->SCR |= SCB_SCR_SLEEPDEEP; PWR->CR |= PWR_CR_PDDS | PWR_CR_CWUF | PWR_CR_LPDS; //PWR->CSR &= ~PWR_CSR_WUF; for (n=0; nBSRR=GPIO_BSRR_BS8; delay(10000); GPIOA->BSRR=GPIO_BSRR_BR8; delay(10000); }
I forgot to enable clock to power control module...
RCC->APB1ENR = RCC_APB1ENR_PWREN | RCC_APB1ENR_BKPEN;
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required