cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer cannot connect to USBX DFU

DmitryR
Associate III

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

0 REPLIES 0