Skip to main content
DmitryR
Associate III
February 25, 2025
Question

STM32CubeProgrammer cannot connect to USBX DFU

  • February 25, 2025
  • 1 reply
  • 523 views

Dear All,

 

On my NUCLEO-U575ZI-Q I have successfully generated USBX-DFU and have come to a point to connect to it with STM32CubeProgrammer. It seems to be very simple, there are six callbacks only:

  • USBD_DFU_Activate and USBD_DFU_Deactivate does not return anyting, so I have left them as is;
  • In USBD_DFU_GetStatus I set the media_status to UX_SLAVE_CLASS_DFU_MEDIA_STATUS_OK and return USBD_DFU_Notify;
  • In USBD_DFU_Read I set the actual_length = length and return UX_SUCCESS;
  • In USBD_DFU_Write  I set the media_status to UX_SLAVE_CLASS_DFU_MEDIA_STATUS_OK and return UX_SUCCESS;
  • In USBD_DFU_Notify I return UX_SUCCESS.

That does not work however. STM32CubeProgrammer connects but immediately reports "Error: Data read failed". In debugger I see that it stucks on requesting status, USBD_DFU_Read is not ever called. Has anyone idea what exactly should be returned by the USBD_DFU_GetStatus? 

 

Regards,

Dmitry

1 reply

Technical Moderator
March 3, 2025

Hi @DmitryR 

As it is dependent on your implementation, at this level, we might not be able to dive deeper to help.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL