EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

STM32F100RC -- GPIO in standby mode?

Started by Kirill Frolov March 31, 2012
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?


On 31/03/2012 11:10, Kirill Frolov wrote:
> > 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? > >
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
On Sat, 31 Mar 2012 14:04:12 +0100, MK wrote:

>> 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? > The pins don't do what you ask !
But they do...
> From the ST RM0041 Reference manual for the STM32F100 > In Standby mode, all I/O pins are high impedance except...
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; n<10; n++) asm volatile ("nop"); asm volatile ("WFE"); /* flash LED if WFE instruction has no effect */ while (1) { GPIOA->BSRR=GPIO_BSRR_BS8; delay(10000); GPIOA->BSRR=GPIO_BSRR_BR8; delay(10000); }
On Sun, 01 Apr 2012 09:13:19 +0000, Kirill Frolov wrote:

> 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). > What I doing wrong?
I forgot to enable clock to power control module... RCC->APB1ENR = RCC_APB1ENR_PWREN | RCC_APB1ENR_BKPEN;

The 2024 Embedded Online Conference