cancel
Showing results for 
Search instead for 
Did you mean: 

USB microphone from the USB speaker example

ERROR
Senior

Hi,

Tried to convert STM32CubeN6\Projects\STM32N6570-DK\Applications\USBX\Ux_Device_Audio_2.0 example of the USB speaker to the USB microphone on STM32N6570-DK.

The USB device is enumerated as an audio recording device, ux_device_class_audio_stream_frame_done() is called, and then I fill the buffer with the functions

ux_device_class_audio_write_frame_get(audio_play_stream, &frame_buffer, &frame_length);
ux_utility_memory_copy(frame_buffer, &stereo24[idx], 12 * 2);
SCB_CleanDCache_by_Addr(frame_buffer, 12 * 2);
ux_device_class_audio_write_frame_commit(audio_play_stream, 12 * 2);

The buffer is filled with a tone of 32767 magnitude, but recorded data is 70dB lower, or just strange noise.

I can share this small project via DM if it's convenient.

Regards.

1 REPLY 1
FBL
ST Employee

Hi @ERROR 

Unfortunately, at this time, there are no direct USB microphone examples available within the STM32Cube firmware package for the STM32N6. However, you may find relevant USB microphone examples by exploring the X-CUBE-AUDIO-Kit package. 

If possible, share your minimal example project via DM. I would be glad to review it and assist you further in resolving the issue.

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.