2012-03-31 03:02 AM
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?
#standby #gpio #stm32f100rc2012-03-31 04:44 AM
for STM32L, i refer Reference Manual, Standby mode explaination
I/O states in Standby mode
In Standby mode, all I/O pins are high impedance except for:
�?
Reset pad (still available)�?
RTC_AF1 pin (PC13) if configured for Wakeup pin 2 (WKUP2), tamper, time-stamp,RTC Alarm out, or RTC clock calibration out.
�?
WKUP pin 1 (PA0) and WKUP pin 3 (PE6), if enabled. I found the smae kind of para in RM0008. (for STM32F) I guess the it shall be same for STM32F100. Refer to right Reference manual.2012-03-31 06:01 AM
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 because by default all microcontroller pins configured as digital inputs consuming current increases when I move hands close to microcontroller. What I doing wrong? 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''); while (1) { GPIOA->BSRR=GPIO_BSRR_BS8; delay(10000); GPIOA->BSRR=GPIO_BSRR_BR8; delay(10000); }2012-03-31 07:13 PM
I would suggest to use the stm32 fw library code example as reference to enter into the Low Power Mode such as standby.
After entering standby mode, the LED shall be turned off, i guess. Your code looks similar to code from library. You can still use the stm32 library void PWR_EnterSTANDBYMode(void) { /* Clear Wakeup flag */ PWR->CR |= PWR_CR_CWUF; /* Select STANDBY mode */ PWR->CR |= PWR_CR_PDDS; /* Set SLEEPDEEP bit of Cortex System Control Register */ SCB->SCR |= SCB_SCR_SLEEPDEEP; /* This option is used to ensure that store operations are completed */ #if defined ( __CC_ARM ) __force_stores(); #endif /* Request Wait For Interrupt */ __WFI(); }2012-04-02 11:59 AM