cancel
Showing results for 
Search instead for 
Did you mean: 

DFU error: bad state machine in firmware

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

Hello Everyone,

I am have a problem using Dfuse (v3.0.5) with my STM32L432KC.

I have a USB CDC class, not using a composite CDC-DFU.

Performing the DFU mode through the boot pin/bit.

During upgrade I got the following error:

0690X0000060BHqQAM.png

After several times (may differ), I can do the upgrade.

Has someone already solved this problem or have any advise?

#dfu #bad-state-machine
6 REPLIES 6
Posted on May 18, 2018 at 14:29

Does STM32L432KC have external clock source?

Check internal frequency via MCO pin PA8

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 18, 2018 at 14:37

I am not using an externel clock.

HSI48 for USB

HSI:16 -> PLL to get 80MHz for the rest

Posted on May 22, 2018 at 10:02

on the MCO pin (PA8) I have a 80Mhz clock corresponding to my SysClk.

Posted on May 22, 2018 at 10:32

The previous answer was when the application was running.

in DFU mode I dont have any clock signal on the PA8 pin.

Posted on May 28, 2018 at 08:17

Turvey.Clive.002

‌, did you get any trouble with DFU and clock?

I have read that they're might be DFU limitations.

0690X0000060BONQA2.png

I have a version information ID = 0x So no known limitations.

but still wondering if they is any.

flo flo
Associate II
Posted on June 22, 2018 at 09:17

I add a sleep time of 50ms 'sleep(50)' in case STATE_DFU_DOWNLOAD_BUSY in RunThread() function inside the downloadthread.cpp file

I have compiled the DFUSE v3.0.5 using the source giving by ST with visual Studio 2017.

Now it's working.