cancel
Showing results for 
Search instead for 
Did you mean: 

Boot configuration on STM32F4 Discovery and BOOTx pin voltage threshold

simo zz
Senior
Posted on November 03, 2017 at 15:39

Hello,

I am designing a schematic with an STM32F407VGT6 (

http://www.st.com/content/ccc/resource/technical/document/reference_manual/3d/6d/5a/66/b4/99/40/d4/DM00031020.pdf/files/DM00031020.pdf/jcr:content/translations/en.DM00031020.pdf

) with reference to the STM32F4 Discovery MB997B PCB version for ensuring important details.

Checking the Boot configuration and debugging the Discovery board, a few doubts come in mind.

The TRM DM00031020 at page 69 section 2.4 Boot Configuration states the following:

BOOT1 Pin

BOOT0 Pin

Boot Mode

x

0

Main Flash boot

0

1

System memory

1

1

Embedded SRAM boot

From the startup_stm32xx.s files of the Standard Peripheral Libraries, I understand the booot mode used is the Embedded SRAM.

Debugging the STM32F4 Discovery Board (

http://www.st.com/content/ccc/resource/technical/document/user_manual/70/fe/4a/3f/e7/e1/4f/7d/DM00039084.pdf/files/DM00039084.pdf/jcr:content/translations/en.DM00039084.pdf

) bot BOOT0 and BOOT1/PB2 pins are used and are at the same voltage (this justifies the SRAM boot configuration) where VPB2 = VBOOT0 = 143.5 mV (I suppose due to pin output impedance).

Looking at STM32F4xx DS (

http://www.st.com/content/ccc/resource/technical/document/datasheet/ef/92/76/6d/bb/c2/4f/f7/DM00037051.pdf/files/DM00037051.pdf/jcr:content/translations/en.DM00037051.pdf

) at table 48 page 114 the VIH threshold is 0.17 VDD + 0.7 so for VDD = 3V, VIH = 1.21.

Measuring the resistors R31 and R34 with an ohmmeter both result 3.52 kΩ (on STM32F4 Discovery DS, R34 is marked as 10 k), while R32 and R30 both are 510 Ω (as DS schematics), and for the voltage divider rule when board powers up, both BOOT0 and BOO1 should be at approx. 380 mV.

This 381 mV value is neither above the VIH threshold read from DS, neither consistent with the measured value on VPB2 and VBOOT0 (that's why I suppose that the pin output impedance is influencing the measurements).

Could you clarify these mismatches between the measured values and the DS thresholds ?

I suspect I am misunderstanding some data but I have to be sure to uderstand the correct configuration.

Thank you in advance,

Regards,

Simon

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on November 03, 2017 at 16:32

Hello Simon!

Measuring the resistors R31 and R34 with an ohmmeter both result 3.52 kΩ

The resistors  soldered on board R31 and r34 are in parallel with pin protection diodes (internal)  and with all other unpowered internal circuitry, so don't rely on this measurement.

Normal voltage at these pins is calculated  3V *510 / (10k +510) =  0.14 v (by design)  that is below VInputLow max voltage.

This means also that BOOT0 is 0 (flash mode) So  we don't care about BOOT1 pin in this case.

If the user wants to boot from other than flash memory, ties the BOOT0 pin to VDD and additionaly uses BOOT1 pin.

 Also startup_stm32xx.s has nothing to do with boot configuration .

Regards

vf

View solution in original post

4 REPLIES 4
Posted on November 03, 2017 at 16:22

VIH provides a pretty high ceiling. The real hazard here is the point at which the processor becomes sentient as the supply rails rise.

A more practical application would have both BOOT pins pulled low with a 10K or 47K, with a test point on BOOT0 to drive it high if programming in production.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on November 03, 2017 at 16:32

Hello Simon!

Measuring the resistors R31 and R34 with an ohmmeter both result 3.52 kΩ

The resistors  soldered on board R31 and r34 are in parallel with pin protection diodes (internal)  and with all other unpowered internal circuitry, so don't rely on this measurement.

Normal voltage at these pins is calculated  3V *510 / (10k +510) =  0.14 v (by design)  that is below VInputLow max voltage.

This means also that BOOT0 is 0 (flash mode) So  we don't care about BOOT1 pin in this case.

If the user wants to boot from other than flash memory, ties the BOOT0 pin to VDD and additionaly uses BOOT1 pin.

 Also startup_stm32xx.s has nothing to do with boot configuration .

Regards

vf

Posted on November 03, 2017 at 17:11

Hello

FORTOUNAS.EVANGELOS

‌ ! don't rely on this measurement.

OK, I was expecting this.

Also startup_stm32xx.s has nothing to do with boot configuration.

OK, I misunderstood the Assembly code, It's time to put my hands back on the ARM ASM book.

Thank you bot

FORTOUNAS.EVANGELOS

‌ and

Turvey.Clive.002

‌.

Simon

Posted on November 03, 2017 at 17:54

Yeah, I'm not sure what code you are looking at exactly, but the board should be booting from FLASH. ie BOOT0 is on the low side.

Code in startup.s (GNU) is typically there to zero some of the statics in RAM, and copy other static initializations from FLASH into RAM, given RAM has indeterminate content at start up.

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