cancel
Showing results for 
Search instead for 
Did you mean: 

running application code after linux dfu-util load to flash ?

sja
Associate II
Posted on June 17, 2012 at 16:08

I am using dfu-util-0.6 under linux to load code to flash. After loading

to flash how do I get the STM32 to run the application code ? I tried

adding -R but the dfu device just re-enumerates after the USB reset.

Also oddly enough if I assert reset with BOOT0=0 without a power cycle

immediately after the DFU load, the application code does not run

(and neither does the DFU).

I have to actually power cycle the board to get the application to run from flash.

After that point a reset works to reset the application. (This happens on the STM32F107

eval board as well as our custom board.)
2 REPLIES 2
stforum.tormod9
Associate II
Posted on June 20, 2012 at 19:54

Hi,

As you probably have seen, the -R option simply issues a USB reset, and it is up to the device what to do about that. From studying the DFU IAP code from the ST USB library it seems that it does not do anything else than resetting the USB status and stays in DFU mode. I suppose the ROM DFU code in the F105 and up is similar. However, in the AN3156 document there is a description of a ''Leave DFU mode'' command which should be pretty simple to implement in dfu-util.

There are some other commands like Mass Erase and Read Unprotect that would be nice to implement as well. Unfortunately I only have F103 devices (running the IAP boot loader) so I can not test these things. Patches, committed testers or Discovery boards thrown this direction would be appreciated :)

Tormod

Posted on June 21, 2012 at 18:12

Patches, committed testers or Discovery boards thrown this direction would be appreciated

 

It would certainly be helpful to get hardware, and general support, to the contributors to the community.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..