2020-04-05 08:37 PM
Hi,
I've used products in the STM32F4 family, but I have two new projects using the STM32L433 and STM32L432. For both of these projects, I am able to write and verify the flash, however I cannot seem to get the chips to boot from it. They always seem to come up running the bootloader instead.
The options bits are all at their default values (nSWBOOT0=1, nBOOT0=1, nBOOT1=1). The flash memory is not blank. I can control the BOOT0 pin (PH3), and I've verified with my meter that it is at 3.3V in one state and 0V in the other. Yet in each case it always runs the bootloader.
I'm using STM32 CubeProgrammer to verify the option bits and that the flash isn't blank, and I'm using dfu-util in linux for programming (since I do all my development in linux). I can of course also dump the flash with dfu-util and verify that it's programmed. I can see that it is running the bootloader every time I plug it in, since it shows up with dmesg, and of course it doesn't seem to be running my code at all.
I know I'm just missing something, but what?
Thanks for any help,
Mark
2020-04-05 10:06 PM
> The flash memory is not blank.
The description is misleading: the algorithm to enter bootloader did not actually check the entire FLASH, just the first word in it, IIRC.
JW
2020-04-05 11:42 PM
Thank you for your response. The first word in flash, at 0x08000000, is 0x20020000.
2020-04-06 01:25 PM
I may have found it. On these boards, BOOT0/PH3 is connected to a button (normally open, to 3.3V) and a 10k pulldown to ground. It appears that the 10k is just too high for some reason. Replacing it with 1k seems to do the trick.
It's not working on the L432 board, but I suspect that may be a soldering issue, since it's QFPN.
2020-04-06 02:19 PM
Also the 0x20020000 is not a valid RAM address for the L43x.
2020-04-10 03:49 PM
I don't quite get it, why would 10k pulldown not be enough.
While RM says it is "in input mode" during the reset/option detection, it does not imply any internal pullup.
Is there any capacitance or anything else connected on the BOOT0/PH3 pin, besides the pushbutton and the pulldown resistor?
Did you try some form of reset (software, hardware using NRST pin), or just powerup?
Could you please observe the behaviour of the pin with the 10k resistor (in the non-working state) during reset/powerup?
JW