STM32L433CCx USBD_DFU_XFER_SIZE wrong? Bug in CubeMX/Firmware?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-27 4:00 PM
Hi
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.
Dieter
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-28 8:09 AM
Hi
Br_ggemann.Dieter
,- Please refer to USB implementation on the
- Also try to have a look toSTM32Cube_FW_L4_V1.6.0\Projects\STM32L432KC Nucleo\Applications\USB_Device\DFU_Standalone example it may be helpful on your case.
-Nesrine-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-28 8:09 AM
Hi
Br_ggemann.Dieter
,- Please refer to USB implementation on the
- Also try to have a look toSTM32Cube_FW_L4_V1.6.0\Projects\STM32L432KC Nucleo\Applications\USB_Device\DFU_Standalone example it may be helpful on your case.
-Nesrine-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-28 9:59 AM
Hi
using
#define FLASH_DESC_STR '@Internal Flash/0x08000000/08*02Ka,120*02Kg'�?
instead of
#define FLASH_DESC_STR '@Internal Flash/0x08000000/01*016Ka,240*001Kg'�?
does the trick as well.
Sorry for the noise.
Dieter
