cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L432KC in DFU Mode firmware upgrade problem

Deniss Kozlovs
Associate
Posted on June 28, 2017 at 11:51

I am experiencing some troubles with STM32L432KC USB Bootloader. I am using DfuSe Demo v3.0.5 to upgrade firmware. 

DFuSe firmware upgrade fails in 95% of situations. Both on our STM32L432KC project and on Nucleo-32 STM32L432 evaluation board. Also tried to upgrade with sample project hex files provided by ST. Same result.

Error Code: Bad state machine in firmware

TransferSize: 2048

DFU State: STATE_IDLE

DFU Status: STATUS_OK

Request: Get Status Request.

CurrentNBlock: 0x0000

CurrentLengths: 0x0005

Percent: 24% (may differ)

Thank you in advance.

#firmware-upgrade #usb-bootloader #nucleo-32-stm32l432 #stm32l432kc #dfuse #bootloader-firmware-upgrade
5 REPLIES 5
luisf
Associate II
Posted on November 10, 2017 at 13:42

I have the same problem. Any update on that?

Posted on April 22, 2018 at 12:11

I have had the same issue on Windows 8 (x64).

I've tried it just now on my home computer (Windows 7 x64) and it seems to work there. Might be the OS then?

flo flo
Associate II
Posted on May 18, 2018 at 14:02

I have the same problem. any update?

I cant find a solution...

synchronization problem?

(I have Win7 x64 and the problem occurs)

Posted on May 18, 2018 at 17:09

Unfortunately no, but the problem must have something to do with the computer (at least in my case).

EM
Associate
Posted on June 21, 2018 at 15:36

I compiled the source code for the DFUSe (downloadable from ST) using visual studio 2013.

I added a Sleep(20) to sleep for 20 ms inside the loop in function

CSTThread

::BodyThread().

Now the function no longer seems to have that error (suggesting that it's a race hazard between threads).

I have a ticket open with ST on the issue but i hope this helps until they solve the issue.

Regards

PS: 20 is a random number that works. i tried 1, 5 and 10 without much luck. Feel free to optimize away, or to select a larger number in case you don't mind waiting (the sleep is called at every sub-step of the erase/flash process)