Skip to main content
BKlus.1
Associate II
May 14, 2022
Question

DFU bootloader issues

  • May 14, 2022
  • 3 replies
  • 1301 views

I am trying to use the built-in bootloader in DFU mode on STM32H743IIT.

1. I built my application and created a *.dfu file

2. The bootloader starts fine and my device enumerates properly as "STM Device in DFU Mode"

3. DfuSe Demo (v3.0.6) detects my device

4. I choose my DFU file and then click "Upgrade." The process appears to complete with message "Target 00: Upgrade successful!"

5. However, when I click "Verify," I get an error message "Matching not good. First difference at address 0x0801F068: File byte is 0x54. Read byte is 0xFF."

6. If I load my application using SWD, and then run bootloader using the same DFU file, it verifies OK.

7. With another (shorter) DFU file, everything works fine

Any ideas/suggestions?

Thanks!

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
May 14, 2022

DfuSe Demo is very old, suggest you use STM32 Cube Programmer in USB/DFU mode.

Also double check alignments, pretty sure the H7 will need 8-byte (64-bit) alignment. I wrote a tool many years ago called HEX2DFU. I might need to dig up a newer version.

https://community.st.com/s/question/0D53W000014yvvkSAA/how-to-generate-hex-file-in-stm32h750vb

https://community.st.com/s/question/0D50X00009XkeovSAB/dfu-fail-verify-8-byte-align-magic

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
BKlus.1
BKlus.1Author
Associate II
May 14, 2022

For some reason, STM32Cube Programmer can't find my device.

I actually tried using your HEX2DFU tool, but it gives me an error message:

F:\M595275-00>HEX2DFU.exe M595275-00.hex -out M595275-00.dfu
HEX2DFU 0.01 Copyright (C) 2013-2017 sourcer32@gmail.com
All Rights Reserved, Non-Commercial Use Only
 
Loading M595275-00.hex...
02 Addr:0000 Type:04 Seg:00000000
:020000040800F2
Extended Linear 08000000
Basis : 08000000
02 Addr:0000 Type:04 Seg:08000000
:020000040801F1
Extended Linear 08010000
02 Addr:0000 Type:04 Seg:08010000
:020000040802F0
Extended Linear 08020000
02 Addr:0000 Type:04 Seg:08020000
:020000040803EF
Extended Linear 08030000
02 Addr:0000 Type:04 Seg:08030000
:020000043000CA
Extended Linear 30000000
ERROR: Hex exceeds buffer
Line 16008 : :1000000000000000000000000000000000000000F0
00 10
ERROR: HEX Checksum

By the way, would you be willing to permit use of your tool in a commercial environment?

Thanks!