Skip to main content
Senior III
November 19, 2025
Solved

USBX Audio Class frame done callback not called

  • November 19, 2025
  • 2 replies
  • 179 views

Please refer to this thread that, for some reason, @FBL accepted as an answer (it is not) https://community.st.com/t5/stm32-mcus-embedded-software/usbx-audio-class-frame-done-callback-not-called/td-p/855262

I'm seeing that when I try to start an audio flux from my PC to the USB Audio driver, I'm seeing the error handler being called with the following stack:

status = _ux_device_stack_transfer_request(transfer, max_packet_size, max_packet_size); 

triggers the error as the status is 38 (what does it mean?). Inside the function, I've found

status = dcd -> ux_slave_dcd_function(dcd, UX_DCD_TRANSFER_REQUEST, transfer_request);

which is the one that returns 38.

In ux_api.h, the only value I was able to find that matches the return value was

#define UX_TRANSFER_BUS_RESET 0x26

 From here, I'm stuck as the ux_slave_dcd_function is defined as 

typedef struct UX_SLAVE_DCD_STRUCT
{

 UINT ux_slave_dcd_status;
 UINT ux_slave_dcd_controller_type;
 UINT ux_slave_dcd_otg_capabilities;
 UINT ux_slave_dcd_irq;
 ULONG ux_slave_dcd_io;
 ULONG ux_slave_dcd_device_address;
 UINT (*ux_slave_dcd_function) (struct UX_SLAVE_DCD_STRUCT *,UINT, VOID *);
 void *ux_slave_dcd_controller_hardware;

} UX_SLAVE_DCD;

 

Best answer by nico23

The issue has been traced back to a bug in the USBX library

2 replies

Technical Moderator
November 19, 2025

Hi @nico23 

I've answered you in the original post! It would be better to address different issues in different posts to avoid misinterpretation.

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
nico23Author
Senior III
November 19, 2025

Please, feel free to delete this post and keep the original one.

The issue is always one, the frame done callback not being called.

nico23AuthorBest answer
Senior III
November 28, 2025

The issue has been traced back to a bug in the USBX library