cancel
Showing results for 
Search instead for 
Did you mean: 

firmware download from usb

er3481
Associate III
Posted on January 30, 2017 at 17:36

Hi,

I am using stm32f429 mcu and i can use usb communication with my board. I want to learn how to download my hex file to mcu from usb port of the mcu. In other words i want to use a simple gui software on my computer, i will browse my hex file and i will send all flash data to stm32f429 through usb port. I have investigated the DFU mode, but it requires to use BOOT0/1 pins of mcu and i don't want to use BOOT pins of the mcu. For this, which steps must i follow? Any advise?

#dfu #stm32f429
11 REPLIES 11
Amel NASRI
ST Employee
Posted on January 31, 2017 at 10:48

Hi

baklac_.eray

‌,

These are the main resources to which you have to refer in order to start with DFU usage:

Please let me know if you find required details/help based on these resources and share with us the status of your project.

If this doesn't meet what you are expecting, don't hesitate to update the discussion.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on January 31, 2017 at 14:05

Hi, Amel

I can not use DFU mode because DFU mode requires usage of the BOOT0/1 pins of the mcu. But because of my circuit is inside plastic case i can not reach both of pins, so i can not use DFU mode. I need a bootloader firmware that wait for any hex output sent from a pc program through USB , and write it to flash area of the mcu.

Posted on February 01, 2017 at 16:12

Hello eb3484,

You can try the following:

Go on my.st.com page

/external-link.jspa?url=https%3A%2F%2Fmy.st.com%2Fcontent%2Fmy_st_com%2Fen%2Fsearch.html%23q%3Dst-link-t%3Dkeywords-page%3D1

Download

  • STSW-LINK007 to support ST-LINKV2 firmware upgrade
  • STSW-LINK009 to be able to connect and flash your board.

Then you can use STM32 ST-LINK (Start->All Programs->STMicroelectronics/STM32 ST-LINK utility) utility to flash your hex onto your board.

Kind regards

Sirma

Posted on February 01, 2017 at 17:48

Hi,

I think you have understood something wrong. I am using the USB port of mcu and i am using my device as Custom HID Device. I can already use ST-LINK for firmware download, but i do not want to use ST-LINK, i want to download my firmware by using USB port of my mcu connected directly to PC like a HID device.

0690X00000603RKQAY.jpg
Posted on February 01, 2017 at 19:24

You don't need to use the BOOTx pins to jump to the ROM based System Loader. This has been covered here dozens of times, please review.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on February 01, 2017 at 19:27

Could you use a VCP mode, and have it accept the .HEX file stream?

Like most things you're likely to have to write code at both ends of the connection.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on February 02, 2017 at 17:54

Hi,

If i do not use the BOOTx pins , how can i jump and hold the mcu in the system boot mode? I think, the jumping to system boot loader is easy but then it is required to hold the mcu in the system boot mode and it will check whether there is any incoming filestream or not. Am i wrong? If so, please inform me because this is the first time that i try to make a bootloader project.

Posted on February 02, 2017 at 18:18

The ROM is within the addressable space of the processor, the code inside executes the same way, you jump to it the way you'd jump to any other arbitrary code location. You can replicate the mapping of ROM to the base of memory via an SYSCFG register. Again, this is a topic that I've covered dozens of times here, please review forum posts covering it. Use the Search option provided, or do I have to dig up the posts for you?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on February 02, 2017 at 19:35

Hi,

Yes, i will be appreciated if you provide the topics about the solution.