cancel
Showing results for 
Search instead for 
Did you mean: 

DfuSe Demo v3.0.6 doesn't flash stm32f722ret6

ab.2
Associate II

I was trying to flash stm32f722ret6 via DFU mode. DfuSe Demo typing successful status but firmware doesn't update.

0693W00000QNm4kQAD.jpg0693W00000QNm59QAD.jpgBut when I download .hex file via ST-LINK a firmware works. What could be the problem?

11 REPLIES 11
Peter BENSCH
ST Employee

Welcome, @Community member​, to the community!

The clock could be the cause of this. DFU runs via the internal bootloader, which requires certain crystal frequencies in order to synchronise. The AN2606 writes about this in section 4.1:

For STM32 devices embedding bootloader using the DFU/CAN interface in which the external clock source (HSE) is required for DFU/CAN operations, the detection of the HSE value is done dynamically by the bootloader firmware and is based on the internal oscillator clock (HSI, MSI). When (because of temperature variations or other conditions) the internal oscillator precision is altered above the tolerance band (1% around the theoretical value), the bootloader might calculate a wrong HSE frequency value. In this case, the bootloader DFU/CAN interfaces might malfunction or not work at all.

Please also check AN2606 which clock frequency is required for your STM32.

Does it answer your question?

Regards

/Peter

In order 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.

Thanks for reply

In my scheme used KXO-V97T 8MHz as HSE. I searched in 36.2 section in AN2606 which clock frequency is required for my MCU. It only says that SYSCLK set in 60MHz and USB clock to 48MHz. Without a specific value of HSE clock. Exist would other reasons my problem?

From despair I conducted an experiment. I flashed my chip via ST-LINK. Then ran the upload action from the chip to backup.dfu in DfuSe Demo. Then erased the chip by using ST-LINK. And flashed backup.dfu back into the chip via DFU mode. It works! It means that the convert function from .hex to .dfu in DfuFileMgr doesn't work. And HSE clock selected correctly. What could you recommend?

0693W00000QNpWwQAL.jpg

How does the binary pulled from an ST-LINK FLASH vs a DFU FLASH look comparatively.

ie FC /B IMAGE1.BIN IMAGE2.BIN

I've posted a tool HEX2DFU in the past, it dealt with some 8-byte alignment issues where the flash-lines are 64-bit wide.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ab.2
Associate II

Many a different. I attach it files below

main - a 7z archive with main.dfu created with DfuFileMgr

ab.2
Associate II

mainfrommcu - a 7z archive with mainfrommcu.dfu uploaded with DfuSe from MCU that by flashing with ST-LINK

ab.2
Associate II

Where I can download hex2dfu tool?

@Community member​ released the tool HEX2DFU in 2018 as a ZIP file here.

Good luck!

/Peter

In order 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.
ab.2
Associate II

Failed to create dfu file. The only option I see is flashing through ST-LINK and uploads DFU file by using DfuSe. Very strange.