This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to wake quickly from standby on STM32F103

Hi,

I'm trying to run an STM32F103 on as little power as possible. Most of the time, the processor is in Standby, waking up occasionally on a RTC alarm interrupt.

When the processor wakes, from the current consumption, it appears that it takes approximately 2ms before I get to the start of my c main() function - which seems like a long time to me.

The processor is fitted with an 8MHz external xtal, but I'm hoping to start up on the HSI clock (which appears to be the case if I check with the debugger).

I'm using the Keil microlib; I know it will take some time to initialise memory etc. - but 2ms seems rather long. According to the hardware manual, the HCI startup time is 2us.

Can anyone give me an idea about what I'm missing? What is the processor doing for 2ms before it gets to main()?

Thanks in advance,

Jon.