2024-08-12 04:53 AM
Hello, i am trying to use system bootloader in STM32F411 for software update via USB. I use a freertos in my project.
Workflow is here: By sending a "BOOT" via Virtual Com Port USB, MCU executes folowing code:
and succesfully jumps into embedded bootloader, so I can read an mcu software with usb in dfu mode
but I can't update a software using "Erasing and programming" tab and get errors "LIBUSB_NO_DEVICE" after erasing of previous software
14:49:48:159 : Download in Progress:
14:49:48:160 : Size : 408 Bytes
14:49:48:160 : Address : 0x08000000
14:49:48:161 : DFU status = 0 : OK
14:49:48:161 : DFU state = 5 : dfuDNLOAD-IDLE
14:49:48:161 : Status: 0, State: 5
14:49:48:161 : setting the address pointer to address: 0x08000000
14:49:48:198 : DFU status = 0 : OK
14:49:48:198 : DFU state = 4 : dfuDNBUSY
14:49:48:203 : DFU status = 0 : OK
14:49:48:204 : DFU state = 5 : dfuDNLOAD-IDLE
14:49:48:204 : sending packet nbr: 0
14:49:48:204 : downloading data
14:49:48:211 : DFU status = 0 : OK
14:49:48:211 : DFU state = 4 : dfuDNBUSY
14:49:48:212 : libusb get status error [-4] : LIBUSB_ERROR_NO_DEVICE
What should i fix in my code to flash a new .hex properly ? Thank you in advance
STM32CubeProgrammer 2.17
2024-08-24 04:14 AM
Dear @butaforsky ,
is that possible to run the USB DFU system bootloader after a power off and power on while forcing the Boot pins by hardware and see if you have the same behavior ?
The goal is to check if the behavior is linked from the FreeRTOS application dynamic jump to system bootloader : such as using shared ressources like RAM or corrupting some buffers causing such issue .
let us know
STOne-32