cancel
Showing results for 
Search instead for 
Did you mean: 

Turn on circuitry issue: Delay at start-up

Posted on February 23, 2016 at 21:49

Hi,

I'm developing on an STM32F410RB Nucleo and have a need for a simple, pushbutton on/off switch for my project.

I'd like the pushbutton to be the single on/off switch, however the system will also need to be able to turn itself off.  I would like to use a

single

power regulator for the whole system which include the MCU and plenty of power-hungry auxiliary components. 

I was looking at latches and flip-flops that could sit above the power regulator, however I finally went with a simple design that works as follows:

- Initial pushbutton grounds series resistors (voltage divider) that lowers voltage on a P-FET that sits at battery voltage.

- this closes the FET and supplies Vbat to the power regulator (30v to 3V3)

- power regulator supplies voltage to MCU and aux components.

- first command for MCU is to push a GPIO high (for the purpose of latching the power on)

- the GPIO drives an N-FET that keeps the series resistor / voltage divider flowing which keeps the voltage low on the P-FET (keeps it closed).

- MCU chooses to stop GPIO and cut power anytime or when the external interrupt from another press of the pushbutton comes in (external interrupt on separate pin, parallel to first press circuitry).

I've tested the above process and it works well, however the MCU takes time to turn on and reach that first command in the main loop.

I'm having to wait 4-6 seconds before the MCU drives that GPIO to latch power on.

I'm not sure if this is the minimum boot/start up time for an MCU or if that can be reduced.

Any information or help on the subject of getting an MCU to execute main loop quicker upon power-on would be greatly appreciated.

Thank you!

Evan

#stm32-boot-power-on-start-up
1 REPLY 1
Posted on February 24, 2016 at 03:08

Using mbed or something else? Several seconds seems rather high.

If using regular C, I'd probably try it without the start up code calling the SystemInit() code, and let the processor start and run from its HSI clock.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..