2012-06-17 07:08 AM
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.)2012-06-20 10:54 AM
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 :) Tormod2012-06-21 09:12 AM
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.