nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE

Hi,

We are working on a project using the nRF5340 Audio DK. We want to take user input either from UART or BLE, and switch between them based on the connection status.

Here’s what we want to do:

  1. If the USB is connected to a PC, the device should automatically detect it and use UART for user input.

  2. If the USB is not connected (running on battery), it should automatically switch to BLE for user input.

How can we make this work?
Can we start with the USB CDC ACM example?
Also, how can we use USBREG on the nRF5340 Audio DK?

Thanks,
Aditya

Parents Reply
  • No, I am not using LE audio. I am working on an audio project, and I am interfacing an external CODEC to produce sound/audio at different frequency and volume (dB). So, I want to implement a feature that can automatically switch between BLE and UART to take user based audio commands. 

    User input parameters:
    1. Frequency
    2. Volume level 

    These parameters can be passed via UART/BLE. Whenever the device works on battery, it should take user I/P using BLE. When the device is connected to a computer, the device should automatically turn off its BLE and start taking user input from UART (USB) 

    "audio control commands" refers to frequency and volume level. We have implemented an algorithm in software to produce audio with different frequency and volume as per the user's input.

Children
Related