cancel
Showing results for 
Search instead for 
Did you mean: 

How to create DFU applications

hholms
Associate II
Posted on November 14, 2007 at 11:09

How to create DFU applications

4 REPLIES 4
hholms
Associate II
Posted on May 17, 2011 at 12:17

Hi,

I have been fooling around with the USB-FDU demo and I have it up and running. Downloading the precompiled images (e.g. Virtual COM Port.dfu) from the ''um0424.zip'' works fine. I am using the DFU Tester(2.1) application to download my own hexfile, but the FDU do not reconize it as an valid application as it do not enter the ''if (((*(vu32*)APPLICATIONADDRESS) & 0x2FFF0000 ) == 0x20000000)''.

Is it possible to give me some hints about how I create an application that is compatible with the FDU firmware?

Or maybe send me the source project for one of the sample DFU images in the ''um0424''?

Best Regards

Henrik Holm

hholms
Associate II
Posted on May 17, 2011 at 12:17

I have read the um00424.pdf again and noted that what the DFU checks that the top-of-stack address is correct in the applicative area of the internal flash.

Is anyone able to esxplain how I set an application up to contain the correct startup code? I am 99% sure that the problem with my applications are because I do not use the correct startup code?

I am using RIDE and gnu tools.

Best regards

Henrik Holm

For the STM32F10xxx the DFU mode is entered after an MCU reset if:

â—� The DFU mode is forced by the user: the user presses the key push-button after a

reset.

â—� There is no correct code available in the applicative area: before jumping to the

applicative code, the DFU code tests if there is a correct top-of-stack address in the first

address in the applicative area of the internal Flash memory (for the STM32F10xxx the

first applicative address is 0x0800 3000). This is done by reading the value of the first

applicative address and verifying if the MSB half-word is equal to 0x2000 (base

address of the RAM area in the STM32F10xxx).

hholms
Associate II
Posted on May 17, 2011 at 12:17

I got it up and running..

Found the STM32F10x_IAP_AN sample code project (IAP via usart).

Then it was just a matter of changing the stm32f10x_flash.ld file supplied there to match the 0x08003000 address :-]

Be safe

hholms
Associate II
Posted on May 17, 2011 at 12:17

I got it up and running..

Found the STM32F10x_IAP_AN sample code project (IAP via usart).

Then it was just a matter of changing the stm32f10x_flash.ld file supplied there to match the 0x08003000 address :-]

Be safe