Skip to main content
Associate II
May 15, 2024
Solved

Missing files in generated code for USB Audio

  • May 15, 2024
  • 2 replies
  • 1391 views

Question for STM.
Could you please advise what to do to make the environment generate audio files?

image.png

Could anyone of you show me how to generate these files?
They are generated for all classes except audio.
I guess there should be these too.
Alternatively, please show me how to create an AUDIO Device using the STM32H5 processor.

Please for the msc class even adds

 

 
storage_configuration_number = USBD_Get_Configuration_Number(CLASS_TYPE_MSC, 0);
storage_interface_number = USBD_Get_Interface_Number(CLASS_TYPE_MSC, 0);
if( ux_device_stack_class_register( _ux_system_slave_class_storage_name,
 ux_device_class_storage_entry,
 storage_configuration_number,
 storage_interface_number,
 &storage_parameter) != UX_SUCCESS)
{
 return UX_ERROR;
}

Edited to apply source code formatting - please see How to insert source code for future reference.

Best answer by KDJEM.1

Hello @konsul41 ;

 

About USB Audio files missing in the generated code, the issue is solved in STM32CubeMX 6.17.0 version.

 

Thank you.

Kaouthar

2 replies

KDJEM.1
Technical Moderator
May 29, 2024

Hello @konsul41 ,

Thank you for your bringing this issue to our attention.

I reported the audio files issue internally.

Could you please give more detail about the MSC issue?

-->Please for the msc class even adds

I found this code in app_usbx_device.c file

 

 /* Get storage configuration number */
 storage_configuration_number = USBD_Get_Configuration_Number(CLASS_TYPE_MSC, 0);

 /* Find storage interface number */
 storage_interface_number = USBD_Get_Interface_Number(CLASS_TYPE_MSC, 0);

 /* Initialize the device storage class */
 if (ux_device_stack_class_register(_ux_system_slave_class_storage_name,
 ux_device_class_storage_entry,
 storage_configuration_number,
 storage_interface_number,
 &storage_parameter) != UX_SUCCESS)
 {
 /* USER CODE BEGIN USBX_DEVICE_STORAGE_REGISTER_ERROR */
 return UX_ERROR;
 /* USER CODE END USBX_DEVICE_STORAGE_REGISTER_ERROR */
 }

 

Is this code missing from another file?

Internal ticket number: 182749 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

Kaouthar

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.
KDJEM.1
KDJEM.1Answer
Technical Moderator
February 27, 2026

Hello @konsul41 ;

 

About USB Audio files missing in the generated code, the issue is solved in STM32CubeMX 6.17.0 version.

 

Thank you.

Kaouthar

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.