AnsweredAssumed Answered

PWR_EnterSTOPMode not reducing current consumption

Question asked by Ahmed Talaat on Jul 4, 2014
Latest reply on Jul 4, 2014 by Clive One
I am developing an application based on the STM32VL Discovery board centred around the STM32F100RBT6B microcontroller.

The application interfaces with an SPI TFT LCD based on ST7735, a set of user push buttons, SPI EEPROM, an external sensor and serial port to dump results to a laptop.

The following peripherals are used in the application:
    - GPIOx, AFIO,
    - EXTI (for receiving interrupts from user buttons)
    - BKP
    - DMA1 for fast data transfer to LCD
    - PWR, RCC
    - RTC to generate alarm interupts to read sensor at predefined user intervals.
    - SPI1 to ocmmunicate with the TFT and EEPROM.
    - TIM2 in capture mode to read the sensor
    - TIM3 in PWM to generate a controlled backlight to the LCD.
    - TIM4 to generate 1ms fixed delay that I use instead of the systick as the systicks prevents the STM32 from sleeping.
    - USART1 to communicate the stored reading in the EEPROM to the serial port of a laptop.

The application initially goes through a series of initializations, then a big while loop, checking for different types of actions to take followed by the following line to put the STM32 into stop mode till either an RTC or EXTI interrupt is received.

PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);

The systick is not enabled or configured. The RTC Alarm interrupt is not activated by default at startup.

I am using HSI clock to avoid reconfiguring the clock after waking up from stop mode.

Going through the debugger, I can see that running the stop command causes the debugger to kind of hang, and pausing it shows that it is stuck at the _WFI command, which tells me that the STM32 is stopped and nothing is waking it up.

However, the current consumption does not change from before and after calling the stop command. It remains at 11mA.

TIM3 is used in PWM mode to drive the LCD backlight and I can see that the LCD is still on despite calling the stop command.

I would expected that this command would turn off all peripherals and stops all clocks and take the current consumption to at least below 100uA.

Are there any commands I have to issue manually before the stop command to ensure that the power goes down.

Outcomes