Skip to main content
Marek Nowak
Associate
May 11, 2017
Question

STM32F0 standby current way too high

  • May 11, 2017
  • 2 replies
  • 2179 views
Posted on May 11, 2017 at 21:37

Hello Guys,

I need your expertise here. Having a problem with current draw in Standby mode ( STM32F091).

I developed custom board with some external components like Accelerometer, Pressure sensor, temperature sensor, RF comm, EEPROM chip. It is powered from two AAA cels.

I attempted several times to go into STANDBY mode, I have obviously shut down all listed components. After all no success, my board takes around 630uA, it can't go any lower.

this is how I put it in standby:

PWR_WakeUpPinCmd(PWR_WakeUpPin_4, ENABLE);

PWR_ClearFlag(PWR_FLAG_WU);

RTC_ClearFlag(RTC_FLAG_ALRAF);

PWR_EnterSTANDBYMode();

I wanted to rule out component by component, difficult to do it on final PCB. I had one spare board, so I mounted only power supply part (boost regulator 3.3V). It consumes only 6uA (quiscent current).

Next I mounted STM32F091, and few capacitors mainly ceramic 100nF + 4uF tanatalum, all as advices per ST app note.

Basically I have very clean, isolated setup STM32 + power supply.

At this stage, I doubt there is a hardware issue in the circuit.

I was looking into capacitor leakage, but certainly I did not find anything that adds up to 630 uA of total current.

Did I miss something, can you guys suggest how to approach this problem.

Thanks,

Marek

    This topic has been closed for replies.

    2 replies

    Marek Nowak
    Associate
    May 12, 2017
    Posted on May 12, 2017 at 08:55

    An important update:

    According to ST datasheet, in standby all pins should go Hi-Z state. Does earlier GPIO init affect this?

    I just measured some pins state and they are all 0V (low state).

    another update:

    Solved high current consumption, now I have nice and steady 11.4 uA, however still gpio pins are not changing to Hi-Z while in standby mode.

    The missing bit was enabling clock to backup domain, before switching to standby:

    RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);

    I just wonder why this piece of information is missing in so many examples one can find on the net.

    Uwe Bonnes
    Chief
    May 12, 2017
    Posted on May 12, 2017 at 11:06

    If you want the pins in High-Z state without massive current flow, set the pins to Analog. Analog mode disables the input amplifier. This amplifier draws high cuurent when the input voltage is not near the rails.

    Uwe Bonnes
    Chief
    May 12, 2017
    Posted on May 12, 2017 at 11:19

    Volatile variables in caches memory may also be a problem.

    Marek Nowak
    Associate
    May 25, 2017
    Posted on May 25, 2017 at 15:59

    @Uwe

    Thanks for advice. Sorry for being dumb, I wanted to take a shortcut, was looking for quick wins, but again experience shows there is no such thing, you need to learn everythin hard way

    Took me lot of time. I was depending on Hi-Z state of MCU i/o pins. Somehow randomly my RF chip (ST Spirit1) was going to sleep, and occasionaly it did not happen. Lot of confusion. Therefore I have added very weak pull-up (680k) on spitrit's SDN pin (shutdown), this step reduced current by few mA.

    Yet another problem 170uA consumed by LIS3DH, some kind of hardware bug (undocumented) i2c address line (SDO) connected to GND was causing this. After connecting SDO to VCC, current consumed by LIS3DH went down to few uA.

    Last one, BME280 from Bosch, was taking constanlty around 400 to 500 uA, putting chip in sleep mode did not help (there is i2c command). Finally I found out that there is a reset command, when I did this 3ms after data readout, chip went to low power mode.

    Finally entire pcb draws 24 uA.