AnsweredAssumed Answered

DFU image for Custom_HID

Question asked by David R. on Dec 3, 2013
Latest reply on Dec 11, 2013 by David R.


I am working on a STM3210E-EVAL with the Device_Firmware_Update project from the USB full speed device library (STSW-STM32121).

With the dfu bootloader, I am able to program into flash the STM3210E-EVAL_CustomHID.dfu located in STM32_USB-FS-Device_Lib_V4.0.0\Utilities\DFU_images.

After reset, the evaluation board is recognized as an USB HID device.

Next step is to try to create a DFU image.

To do so, I have successfully flashed a dfu image based on the binary_template project located in STM32_USB-FS-Device_Lib_V4.0.0\Projects\Device_Firmware_Upgrade :

1)    build the hex from binary_template project

2)    convert the hex into dfu with DfuFileMgr.exe

3)    flash the dfu image into flash with DfuSeDemo.exe


However I have some troubles applying the same procedure with the Custom_HID project located in STM32_USB-FS-Device_Lib_V4.0.0\Projects

The issue lies in  step 1) above, ie the building of the hex image.

According to the binary_template project, two things are needed to build a binary for a dfu image:

-          set the flash start address at 0x08003000 in the linker

-          set the vector table at the top  of the Flash space 0x8003000 : NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x3000)

Those two changes are confirmed by ST FAQ :

Applying those changes to the Custom_HID project lead to a failure when the evaluation board is attached to a PC: the usb device is not recognized properly.

What am I missing to adapt the Custom_HID project for a dfu image?