2022-09-01 02:00 AM
STM32CubeProgrammer Win64 v2-11-0
Windows 10
STM32F411xC/E
Device ID 0x431
Can connect to MCU with STM32Cube via USB in DFU mode, can erase memory blocks, cannot write to memory blocks due to libusb control transfer error [-9].
Can anyone help me fix this?
Excerpt of Debug messages Below
09:19:32:270 : erasing sector 0005 @: 0x08020000 done
09:19:32:270 : erase: 4385ms
09:19:32:271 : Download in Progress:
09:19:32:271 : Size : 183204 Bytes
09:19:32:271 : Address : 0x08000000
09:19:32:276 : DFU status = 0
09:19:32:276 : DFU State = 5
09:19:32:276 : Status: 0, State: 5
09:19:32:276 : setting the address pointer to address: 0x08000000
09:19:32:283 : DFU status = 0
09:19:32:283 : DFU State = 4
09:19:32:283 : DFU status = 0
09:19:32:284 : DFU State = 5
09:19:32:284 : sending packet nbr: 0
09:19:32:284 : DFU status = 0
09:19:32:284 : DFU State = 5
09:19:32:284 : downloading data
09:19:32:304 : libusb control transfer error [-9] : LIBUSB_ERROR_PIPE
09:19:32:304 : sending a dfu abort
09:19:32:304 : sending an abort request
2023-03-20 10:39 AM
@DCook.1
Any luck on resolving this issue? I am seeing the exact same error on my STM32L4P5 MCU. Thanks.
Eric
2023-06-19 05:21 PM
I figured the issue I had. You need to make sure that the memory paging is set up correctly and the FLASH_DESC_STR is set correctly in usbd_dfu_if.c. In my case I am using the STM32L4P5CGTxP, so I set it to the following: #define FLASH_DESC_STR "@Internal Flash /0x08000000/016*04Ka,240*04Kg"
Regards