cancel
Showing results for 
Search instead for 
Did you mean: 

BOOT0 sampling timing

liteyear
Associate III

Posting mostly to record some data on a pretty data-free topic.

 

How long after reset is released does the state of the BOOT0 pin get sampled? On the STM32F413 in particular, but it would be good to know how consistent the spec is.

 

The official docs always just say "pins are latched on the 4th rising edge of SYSCLK after a reset" (or possibly "of startup clock"), but are never clear on when SYSCLK starts. I figured I had a few 10's of µs to play with, but it turns out I was wrong.

This scenario is not fast enough:

24.png

 

Blue is my BOOT0/NRST signal generation trigger and not important here. Magenta is NRST and cyan is BOOT0.

At the trigger ("T") point NRST is asserted and the STM32 reliably goes into reset (after a <1µs glitch filter). 70µs later I simultaneously release NRST and drive BOOT0 low with the intention of a normal Flash boot. It is not successful, and the STM32 enters the bootloader instead.

The logic thresholds are here:
Screenshot 2025-10-09 at 3.19.23 pm.png

 

and my Vdd is about 3.15V. So NRST should de-assert by 2.21V, and BOOT0 should be low by 0.42V. There's appears be not more than a couple of µs before that condition is met, but it is not enough.

On the other hand, if I speed up the BOOT0 transition, I get this:

26.png

 

And normal boot is successful.

So I don't know what the threshold is, but it seems you want the BOOT0 state to be stable very, very soon after NRST is released.

1 REPLY 1
TDK
Super User

It's not specified, but as you can see it's quite quick. If you want to guarantee the desired behavior, have BOOT0 in the desired state prior to releasing NRST.

If you feel a post has answered your question, please click "Accept as Solution".