Skip to main content
Graduate II
November 10, 2025
Question

USB microphone from the USB speaker example

  • November 10, 2025
  • 1 reply
  • 117 views

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.

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    November 10, 2025

    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.