2017-11-03 07:39 AM
Hello,
I am designing a schematic with an STM32F407VGT6 (
) 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 (
) 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 (
) 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
Solved! Go to Solution.
2017-11-03 08:32 AM
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
2017-11-03 08:22 AM
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.
2017-11-03 08:32 AM
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
2017-11-03 10:11 AM
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
andTurvey.Clive.002
.Simon
2017-11-03 10:54 AM
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.