cancel
Showing results for 
Search instead for 
Did you mean: 

Generated .dfu file not working in STM32F2 nucleo board

Pranay Dhuri
Associate II
Posted on May 11, 2017 at 13:34

Hi ,

I am trying to upgrade my .dfu file into the board. i have converted binary file from GPIO_EXTI available in sample projects.

steps that I have done for flashing the dfu file are

1) flashed dfu sample code into the board

2) pressed user button to switch into DFU mode

3)generated my .dfu file from binary file using 'dfu file manager'

             - entered product ID & version as it was showing in DfuSeDemo.

             -selected binary file to be converted

             -set address as 0x08008000 (which is same as USBD_DFU_APP_DEFAULT_ADD)

    and generated the .dfu file

But while upgrading this file to board ,is is not able to leave the DFU mode.

dfu file which is available in STM32F2Cube is working fine.

I searched for the same problem on forum but all the tricks i tried aren't working.

Any kind of help on this will be truly appreciated...

5 REPLIES 5
Posted on May 11, 2017 at 13:43

But is the image linked/build at 0x08008000? Check the .MAP file and linker script or scatter file

Does it run straight out of the debugger? ie will it download via the ST-LINK and run properly?

Using what tools?

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 11, 2017 at 14:04

1)

In the linker script 

/* Specify the memory areas */

MEMORY

{

FLASH (rx) : ORIGIN = 0x8008000, LENGTH = 1024K

RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K

}

previously it was -

/* Specify the memory areas */

MEMORY

{

FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K

RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K

}

 then I edited this file and compiled the project again...(as this procedure i read somewhere in forum itself)

2)

Yes. By directly uploading binary file, it is working.

Posted on May 11, 2017 at 14:18

tools:-

-SW4STM32

-DFU file manager (v3.0.5)

-DfuSe Demo (v3.0.5)

Imen.D
ST Employee
Posted on May 16, 2017 at 14:50

Refer to this duplicate

https://community.st.com/0D50X00009XkXy6SAF

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on May 16, 2017 at 17:52

Use a .HEX file to generate .DFU files, less chance of transcription errors, and code will be placed as built by the linker.

Make sure that SCB->VTOR is set to 0x08008000 in system_stm32f2xx.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..