Skip to main content
Visitor II
August 17, 2022
Question

Is it possible to incorporate serial communication to a STM32L476 that is already defined as a USB Audio device?

  • August 17, 2022
  • 1 reply
  • 1069 views

I already define the nucleo-STM32L476 as a USB microphone, but I want to know if it is possible to communicate with the microcontroller trough serial communication. I want to implement these feature because I want to change the digital filters that I am applying to the signal. For example, If I send the command ¨voice¨ trough serial, the microcontroller will select the filters that prioritize the voice and if then I send the command ¨guitar¨ I will be able to change the filters. I will appreciate any advice or help.

    This topic has been closed for replies.

    1 reply

    Super User
    August 17, 2022

    Do you want to add serial comms as an additional USB device (i.e. virtual COM port aka CDC)? Then, yes, but not necessarily straight forward. Search for "usb composite device". Some newer versions of the CubeMX/HAL libraries may have examples of composite device implementation. or look for the "tinyusb" project. [EDIT: presuming the L746 has enough endpoints - I didn't check]

    Or do you want to serial comms via a UART. That is trivial (compared to USB).