2016-01-14 11:33 PM
I have been using ST-Link to flash the firmware of STM32L151Cx. Now, I would like to add the feature of flashing the uC using USB. I have checked on the datasheet and knowing that if I set BOOT0 = 1 and BOOT1 = 0 and power cycle the module, it will get me to the System Memory Boot Mode. Then, I can use USB and DfuSe Demo to flash the firmware. My question is - do I need to modify my code/firmware to have this feature? Or it will work without any modifications?
2016-01-15 12:09 AM
Hi,
Nowadays, I plan to do it with 32f103, too. From what I understand you don't have to flash your mcu. Embedded bootloader is already exist. I plan to use dfuse for first time program. I couldnt see ''STM device in DFU mode'' at device manager it didnt work fine,yet. What about you?2016-01-16 08:01 AM
Hi,
Thanks for the reply. I actually wanted to upload my user application firmware to the mcu via USB (by setting BOOT0 = 1 and BOOT1 = 0). Is that what you are trying to do too? I tried to plug in my device to PC after setting the BOOT pins and power cycle the device. However, I couldn't get ''STM device in DFU mode''. Do you think I would need to change my codes to get this worked? Thanks.2016-01-16 08:09 AM
The loader is in ROM, it is executing that code, your code is irrelevant.
Not all STM32 support USB and DFU mode. Check the documentation related to specific clocking requirements for the ROM.You should perhaps explain your design in more detail.2016-01-16 11:57 PM
Thanks. I would like to design my end product in such a way that the end user can update the firmware by using a normal USB (not USB to uart). According to data sheet and some other websites, I can do that by just setting the BOOT0 and BOOT1 pins and reset the device.
I have checked the data sheet and the mcu that I'm using has the DFU feature. Also, I have my USB DP and DM pins connected to PA11 and PA12. I tried it with my win 7 PC but the PC just couldn't detect the device.
I just wonder if I have to modify my firmware so it can get this feature worked.
2016-01-16 11:58 PM
2016-01-18 06:49 AM
Any suggestions? I am quite new on this and it might not make any sense. Thank you.
2016-01-20 04:38 AM
Hello,
Maybe you can try with different MCU even AN3156 document says your stm32L151 mcu supports DFU bootloader. Maybe yours is not one of STM32L1xxxC, STM32L1xxxD, STM32L1xxxE.http://www.st.com/web/en/resource/technical/document/application_note/CD00264379.pdf
I also realized that my stm32f103 mcu doesn't supports dfuse so I gave up.