AnsweredAssumed Answered

Custom Bootloader

Question asked by a.daniel on Mar 25, 2013
Latest reply on Jul 4, 2013 by Philip
Hi all,
I have tried the USBD DFU project by ST and it works on an STM32F2xx microcontroller. What happens is that the first 3 sectors (3x16KB) are reserved for the bootloader itself and, since the code is less than 4KB long, I have tried to modify it to only make use of the first sector.

For this, I have changed the APP_DEFAULT_ADD constant from 0x0800C000 to 0x08004000 and, apparently that should suffice. However, for some reason, the DFU Demonstrator (only tool I know to flash dfu files into an STM32) still sees the 3 first sectors as Read Only and it doesn't even try to send data before 0x0800C000 address.

I've deeply searched throughout the code and can't find anything that prevents from writing beyond 0x08004000. I guess that it's something to do with the device enumeration (VID/PID/version/config descritptors, etc.) but tried without luck.

I'd really appreciate some light here. Btw, do you guys use DFU demonstrator to flash dfu files or there's something more convenient to do that? If only the source code of it would be available I could try and sort it out myself but things are too opaque when it comes to STM32 DFU imho.

Many thanks