Skip to main content
SSoni
Associate III
May 27, 2019
Question

How to use USB-DFU in presence of UART or I2C or SPI being present in the code running on the board?

  • May 27, 2019
  • 4 replies
  • 1211 views

I was using USB-DFU for uploading LED related codes on STM32F446RE but then I came across bootloader selection flowchart which I am attaching with this question. According to this flowchart, I won't be able to access the bootloader mode in presence of protocol which at a higher priority in the flowchart so I tried accessing bootloader via USB when a code using UART was present on the board.

I am not able to access the bootloader through USB now.

Kindly suggest a way for accessing the bootloader through USB in presence of UART or I2C or SPI etc in the already running code which come above in the bootloader access priority list.

Thanks in advance

Siddharth

This topic has been closed for replies.

4 replies

SSoni
SSoniAuthor
Associate III
May 30, 2019

Guys, is the question not clear?

Tesla DeLorean
Guru
May 30, 2019
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
SSoni
SSoniAuthor
Associate III
May 30, 2019

That question was also posted by me. Actually I posted that question first but since no reply came on that, so I posted it framing it a little differently as this one. But no valuable reply came at either thread. If you can help me, please do. I am stuck.

Thanks.

Bob S
Super User
May 30, 2019

If the UART/SPI/I2C/CAN traffic is coming from outside your board and you have no way to stop it, you can't reliably use the built-in boot loader. The alternative is to implement your own DFU code in your app. I don't know about the CubeF4 library, but the L4 library has a sample DFU application (look for a directory named "DFU_Standalone").