2018-12-27 01:47 AM
We have a customised PCB and would like to have the feature of being able to flash the firmware using USB. So, we have the USB DM and DP pins wired to PA11 and PA12 pins (of STM32L152), respectively. We also configured the BOOT0 to HIGH and BOOT1 to GND.
We are using Win7 and tried to install the driver (DfuSe v3.0.6\Bin\Driver\Win7\x64\STube.inf ) but there is an error message pop up as below:
Anyone have the same problem? Since I failed to install the driver, the DfuSe Demo (v3.0.6) doesn't seem to be able to find any available DFU devices.
Thanks for any suggestions in advance!
2018-12-27 02:39 AM
Do I have to enable anything on my firmware setting to get it worked?
2018-12-27 03:06 AM
The STM32 Cube Programmer might have newer drivers, and supports DFU mode moving forward. https://www.st.com/en/development-tools/stm32cubeprog.html
DELL?
Device connected directly to the computer, or via hub/expander?
I might check on Upper and LowerFilter settings, and AV software, or other settings that might interfere with connectivity.
Try on a different system. Also port or cable.
Check NRST, make sure device doesn't reset during connectivity
2018-12-27 08:05 AM
Thank you so much for your reply.
Do I need to do anything at the firmware? For example, to initialise PA11 and PA12 as USB port? Are there any example on how to initialise this?
2018-12-27 10:02 AM
You'd think booting into the ROM would suffice.
2018-12-27 10:16 AM
Ok, sure.
I found this example called DFU_Standalone. I guess it doesn't make any different compared to the factory bootloader?
2018-12-27 10:42 AM
The ROM boot loader runs assuming there is no user firmware, check the requirements described in App Note AN2606
You can create your own firmware implementing a DFU mode, allowing you to use your own VID/PID and descriptors, and tackle any oddness you've baked into your board design.
2018-12-27 07:59 PM
I am a bit confused now (sorry, I'm new in bootloader area) and hope you could help me to understand further. Thank you very much! My questions as below:
(1) I thought all (or most of the) STM32 microcontrollers have a factory bootloader and we are not allowed to replace it.
My understanding is we have bootloader program and application program. Since we can't design and replace the bootloader program, then what is this DFU_Standalone example for? Is it for application program?
(2) I have my own application program now (just a "hello world"). I guess I won't need to configure anything at my application program (like enable USB,etc.) in order to use the DFU? I supposed the factory bootloader can support USB to flash the application program when I configured the BOOT0 to HIGH?
Thank you so much!
2018-12-28 01:50 AM
The system boot loader is in ROM, it will start whenever you reset or power up device with BOOT0 strapped high.
It can't be erased and doesn't care what your app is doing.
You can implement your own loader, within user flash, if you want it to report or respond differently. ie say it is an ACME device rather an ST one, via VID/PID etc