STM32F100RC -- GPIO in standby mode?

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?

Reply to
Kirill Frolov
Loading thread data ...

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

Reply to
MK

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); }

Reply to
Kirill Frolov

I forgot to enable clock to power control module...

RCC->APB1ENR = RCC_APB1ENR_PWREN | RCC_APB1ENR_BKPEN;

Reply to
Kirill Frolov

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.