cancel
Showing results for 
Search instead for 
Did you mean: 

USB Audio command function not being called

Deimos
Associate II

I'm trying to go about creating a USB Audio interface on a NUCLEO-H7S3L8, receiving USB audio and forwarding it to the SAI, in order to send to an external DAC.

Among other tests, I went back to checking when the functions in usbd_audio_if.c get called, to set up transfers of the packets received.
And while in a previous version of the same project, on audio playback on the host, AUDIO_AudioCmd_HS() was called, allowing me to continue handling data accordingly, after a Cube MX update (6.14->6.15) and some changes on DMA (to get circular -> non-circular) and SAI (Output Drive enabled) settings, it no longer gets called on playback (a breakpoint within it never gets reached).

Following the IRQ handler function for USB on either playback or idle, it only ends up within the code block for handling an incomplete "ISO OUT Interrupt", reaching the "__HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_PXFR_INCOMPISOOUT)" macro.

Since the changes I've made ever since it was functional seem mostly irrelevant, I can't exactly find why this is the case, so if anybody has any advice, it'd be much appreciated.

I'll attach usbd_audio_if.c where I'm checking for it, as well as the IOC file of the project (where most of the USB settings are similar to those of the Audio_Standalone example for STM32H7S78_DK).

1 ACCEPTED SOLUTION

Accepted Solutions
Deimos
Associate II

Just to close the topic, turns out it wasn't anything related to the board or the examples themselves, but OS related on the USB host side.

View solution in original post

3 REPLIES 3
FBL
ST Employee

Hi @Deimos 

Do you replicate the issue using the example firmware?

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.


Deimos
Associate II

Hello,
I'm working on a NUCLEO-H7S3L8 board, and unfortunately can't test the Discovery board's  Audio_Standalone example directly.

But tests for the CDC and HID examples for the NUCLEO work fine, if that helps.
Testing on a clean project, made in Cube MX 6.14, that completely mimics the USB setup on the Discovery Audio example in CubeMX, I still can't get AUDIO_AudioCmd_HS() to be called on audio playback, with or without added code within the function.

Deimos
Associate II

Just to close the topic, turns out it wasn't anything related to the board or the examples themselves, but OS related on the USB host side.