AnsweredAssumed Answered

STM32L433CCx USBD_DFU_XFER_SIZE wrong? Bug in CubeMX/Firmware?

Question asked by Br_ggemann.Dieter on Feb 28, 2017
Latest reply on Feb 28, 2017 by Br_ggemann.Dieter



CubeMX generates in usbd_conf.h:


#define USBD_DFU_XFER_SIZE 1024


This is the reported transfer size also for tools like dfu-util

"Device returned transfer size 1024"


But the size of pages of the flash is 2048 bytes for this device.


When download firmware.bin by this so configured interface any page gets erased again

after the first 1024 bytes are written. So in the end from any 2k flash page only the upper half

is written, The lower half contains FFFFFF....


#define USBD_DFU_XFER_SIZE 2048

makes the thing work for me.