2025-01-31 04:27 AM
I can program my bespoke board using a repurposed USB port. It would normally be used by a mouse.
I was under the impression that if I powered up the board with BOOT0 pin held high the MCU would be in a state to connect to USB and do it's enumeration. However, using USB Device Tree Viewer I can see the 43 error.
If I then hold the NRST pin low for a few seconds, and then release enumeration follows and I am able to program the device.
Is this expected operation? I thought simply powering up the PCB with BOOT0 high would place the MCU in the correct state ready for programming?
2025-01-31 04:33 AM
Hello,
You need to reset the MCU after holding high the BOOT pin .
2025-01-31 05:29 AM
Thanks for confirming. I can't find any programming guide or application note that says that, hence the question.
Furthermore, I find for reliable connection I have to power up in reset, remove the reset link and then attach the USB cable to the socket.
In fact the whole process of connecting is a little unreliable depending on port and / or the USB hub.
2025-01-31 05:46 AM
Check you cable and your hardware.
You can either use reset or power cycle the MCU after pulling up the BOOT pin.
You can also refer to these articles:
DFU mode with system bootloader is not working, while USB does
How can I use STM32CubeProgrammer to access the USB-DFU bootloader on my STM32 board?
Hope that helps.
2025-01-31 05:49 AM
Powering up with BOOT0 held high should be sufficient. Might be running into an issue with the crystal having a startup time.