2020-11-26 03:16 AM
Hello,
I have created a DFU project with CubeMX in order to update the STM32L433CCU6 on my custom board through USB. The board is recognized by CubeProgrammer:The USBD_DFU_APP_DEFAULT_ADD is 0x8008000. Then, I have created a project to simply turn on a LED. I have changed the Flash_Based value (0x8008000) and the icf file. The problem occurs when I upload the file to the uC using Cube Programmer. The update looks ok, but there is an error during the verification process:
You can find attached both ioc files: the DFU bootloader and the application. Is there something I am missing or I am doing wrong ?
Thanks for your help.
2020-11-26 07:49 AM
Hello,
I partialy found the solution. Cube MX generates empty Read/Write/Erase functions in usbd_dfu_if.c, so I copy paste the code from another similar file from CubeL4 library, and now, the DFU works ! But just once... When I unplug my board and plug it again with USB, I can't update it through USB, I have the following error in Cube Programmer:
The DFU process works ONLY if: 1) I do a mass storage erase with Cube Programmer and STLink plugged, 2) I download the DFU bootloader generated with CubeMX. After that, I can update my application, but once...
Any idea ?