<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123318/nrf5340-audio-dk-auto-switch-input-between-uart-usb-and-ble</link><description>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: 
 
 
 If the USB is connected to a PC, the device should</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Aug 2025 08:41:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123318/nrf5340-audio-dk-auto-switch-input-between-uart-usb-and-ble" /><item><title>RE: nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/thread/544575?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2025 08:41:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebe4df22-38b3-49bb-adaf-63033de41bf2</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;When you mention UART, does UART refer to CDC ACM or J-Link UART?&lt;br /&gt;&lt;br /&gt;Can you provide more information about &amp;quot;It shows up for just a brief moment and then drops&amp;quot;?&lt;br /&gt;&lt;br /&gt;If you want to detect if something is controlling J-Link, you should probably implement CDC ACM and use CDC ACM interface.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/thread/544379?ContentTypeID=1</link><pubDate>Sat, 02 Aug 2025 04:10:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3036ed2-a10e-418a-800b-33f42b1e9213</guid><dc:creator>Aditya P</dc:creator><description>&lt;p&gt;No, it is not useful.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/thread/544321?ContentTypeID=1</link><pubDate>Fri, 01 Aug 2025 12:09:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76e89ce2-71f4-46b1-b53a-abbacfd65805</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Could&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_udc_api.html#details"&gt;USB device controller driver API&lt;/a&gt;&amp;nbsp;be useful in your case?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/thread/544264?ContentTypeID=1</link><pubDate>Fri, 01 Aug 2025 05:56:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae0e3750-47bf-47c8-a351-d169d0fc2c2e</guid><dc:creator>Aditya P</dc:creator><description>&lt;p&gt;I tried using the &lt;code data-start="93" data-end="106"&gt;usb_state.c&lt;/code&gt; example libraries and API to handle USB detection. It kind of works, the USB-C port is connected through J-Link, and I can detect the device. But the problem is that the connection isn&amp;#39;t stable. It shows up for just a brief moment and then drops, so I can&amp;rsquo;t really make use of it in the code. Seems like the issue is coming from the J-Link interfering with the USB connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/thread/544234?ContentTypeID=1</link><pubDate>Thu, 31 Jul 2025 14:16:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1917c797-75f3-46df-9066-09a6ea5df58d</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Since you are using nrf5340 which has USB interface, this interface should be able to detect if it is connected to USB host. It is possible to know if USB interface is connected or not. You can look at this&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/465de1b4a646fda5ed151d52fa71a9a4fc088efe/applications/nrf_desktop/src/modules/usb_state.c#L886"&gt;example&lt;/a&gt; from nRF Desktop.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/thread/544160?ContentTypeID=1</link><pubDate>Thu, 31 Jul 2025 04:41:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31887f10-3626-4001-9e4e-2b16f7329551</guid><dc:creator>Aditya P</dc:creator><description>&lt;p&gt;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.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;User input parameters:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;1. Frequency&lt;br /&gt;2. Volume level&amp;nbsp;&lt;br /&gt;&lt;br /&gt;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)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&amp;quot;audio control commands&amp;quot;&lt;/strong&gt; refers to &lt;strong&gt;frequency&lt;/strong&gt; and &lt;strong&gt;volume level&lt;/strong&gt;. We have implemented an algorithm in software to produce audio with different frequency and volume as per the user&amp;#39;s input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/thread/544130?ContentTypeID=1</link><pubDate>Wed, 30 Jul 2025 15:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb0e8db4-ecf9-4f9a-adfa-f64ce7712b2e</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Do you use LE Audio?&lt;br /&gt;Can you describe your use case in more detail? What is user scenario in your case?&lt;br /&gt;What kind of features are you trying to achieve?&lt;br /&gt;What do you refer to as &amp;quot;audio control commands&amp;quot;?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/thread/544061?ContentTypeID=1</link><pubDate>Wed, 30 Jul 2025 11:15:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b20e93d-da4f-4e06-a042-fd27a29d8c89</guid><dc:creator>Aditya P</dc:creator><description>&lt;p&gt;I want to send audio control commands as input. I am trying this on both nRF5340 Audio DK and nRF52832 DK, but not able to detect the USB when plugged. So, because of that, we are not able to switch to UART mode for user input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Audio DK: Auto-Switch Input Between UART (USB) and BLE</title><link>https://devzone.nordicsemi.com/thread/544040?ContentTypeID=1</link><pubDate>Wed, 30 Jul 2025 09:52:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69b5dbad-b15d-4638-92ff-ea092dc02450</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Can you provide more information on the type of input in your case? Do you want to use audio or control commands as input?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>