<?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>I2S help on nRF5340 Audio DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127045/i2s-help-on-nrf5340-audio-dk</link><description>Hi, 
 For my university masters group project I need to connect my nRF5340 Audio DK to another board (Ambiq Apollo 510B). I will need to send audio from the mic to the Apollo via I2S on the GPIO pins. The apollo will then send back processed audio via</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Mar 2026 11:11:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127045/i2s-help-on-nrf5340-audio-dk" /><item><title>RE: I2S help on nRF5340 Audio DK</title><link>https://devzone.nordicsemi.com/thread/562304?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2026 11:11:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53977869-838d-4f62-b34f-fffa843b5579</guid><dc:creator>Syed Maysum Abbas Zaidi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We recommend starting from your working SPI example and adding the audio parts into it, rather than starting from unicast_server. The unicast_server app is complex because it includes a full Bluetooth LE Audio stack which you don&amp;#39;t need.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mic input:&lt;/strong&gt; The microphone data is captured in audio_datapath.c, function audio_datapath_i2s_blk_complete(). This is called automatically every 1ms when a new block of raw audio (PCM) from the mic is ready. It puts that audio into a queue, which is then picked up by encoder_thread() in audio_system.c. This is the exact place where you replace the BLE send with your SPI send to Apollo.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Headphone output:&lt;/strong&gt; Call hw_codec_default_conf_enable() from hw_codec.c once at startup to initialize the on-board CS47L63 codec chip. Then, when you receive processed PCM back from Apollo over SPI, feed it into audio_datapath_stream_out() in audio_datapath.c, this will automatically play it out through the headphone jack.&lt;/p&gt;
&lt;p&gt;You will also need to bring in audio_i2s.c and cs47l63_comm.c as these are required dependencies of the files above and Yes, it should be feasible if you keep the scope simple.You already have SPI working which is a great start, so focus next on getting the codec initialized and audio playing through the headphone jack before wiring in the SPI audio transfer.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Syed Maysum&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2S help on nRF5340 Audio DK</title><link>https://devzone.nordicsemi.com/thread/562230?ContentTypeID=1</link><pubDate>Fri, 27 Feb 2026 14:42:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb4c3917-b7e2-4bcb-9a27-36667939f58a</guid><dc:creator>Lawrence_p</dc:creator><description>&lt;p&gt;Thanks,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For SPI, I have been able to set up my audio dk as a master (with the help of this code&amp;nbsp;&lt;a id="" href="https://github.com/too1/ncs-spi-master-slave-example"&gt;https://github.com/too1/ncs-spi-master-slave-example&lt;/a&gt;) and it sends a 2 byte transaction every second.&lt;/p&gt;
&lt;p&gt;I have had a look at the unicast server application and I&amp;#39;m struggling to find the code that I need due to its complexity. I have also had a look at the documentation. Could you point me to the specific part of the code that takes the mic input? and the part that sends it to the headphone jack?&lt;/p&gt;
&lt;p&gt;Also, would you recommend that I create my application using my SPI example as a base and adding the mic input and headphone output into that code. Or would you recommend modifying the unicast server application to add SPI?&lt;/p&gt;
&lt;p&gt;Finally, do you think its feasible for me to get this working within the next 10 days? That is when my university project ends.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Lawrence&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2S help on nRF5340 Audio DK</title><link>https://devzone.nordicsemi.com/thread/561962?ContentTypeID=1</link><pubDate>Tue, 24 Feb 2026 14:53:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ed5a950-1af0-4d8b-9be2-b13f76fc8776</guid><dc:creator>Syed Maysum Abbas Zaidi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;A good starting point could be to use&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/unicast_server/README.html"&gt;nrf5340_audio/unicast_server&lt;/a&gt;&amp;nbsp;(headset).&amp;nbsp;That application already implements the full local audio path on the nRF5340 Audio DK, microphone input, buffering, and playback through the on-board CS47L63 codec to the headphone jack.&lt;/p&gt;
&lt;p&gt;There is no Nordic out of the box example where audio is sent over the SPI to another chip and back, however you could use the Zephyr&amp;#39;s SPI API for it.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Syed Maysum&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2S help on nRF5340 Audio DK</title><link>https://devzone.nordicsemi.com/thread/561910?ContentTypeID=1</link><pubDate>Tue, 24 Feb 2026 08:07:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b613c92c-259b-4e4c-a103-02b83b5e31d1</guid><dc:creator>Lawrence_p</dc:creator><description>&lt;p&gt;Thanks! We have decided to go for this approach now: stream mic audio from the nRF5340 audio DK to the apollo via SPI. The apollo will then send back processed audio via SPI. This processed audio will be output to the headphone jack on the nRF5340.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there any example code for the nRF5340 that can do this or something similar?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2S help on nRF5340 Audio DK</title><link>https://devzone.nordicsemi.com/thread/561364?ContentTypeID=1</link><pubDate>Tue, 17 Feb 2026 13:55:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8eee5ab6-8f76-4d20-ada6-4c66ad5e5ede</guid><dc:creator>Syed Maysum Abbas Zaidi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;For your setup there is one important limitation on the nRF5340 Audio DK that the board only has one&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/i2s.html"&gt;I2S peripheral (i2s0)&lt;/a&gt;. This I2S is normally used to communicate with the on-board codec (CS47L63), which provides both the microphone input and the headphone output. If you instead route I2S to the external header (P10) to talk to the Apollo, the codec path is typically bypassed, so you cannot use a second simultaneous I2S link back to the headphone jack.&lt;/p&gt;
&lt;p&gt;In other words, the mic to Apollo over I2S and back over I2S to Audio DK headphone architecture is not directly supported as two parallel I2S connections.&amp;nbsp;The practical options are either use I2S on P10 to/from Apollo and do audio output on the Apollo side, or keep the standard Audio DK codec path for mic and headphone and exchange PCM with Apollo over another interface (like SPI), which is usually the simpler way to keep the headphone jack working.&lt;/p&gt;
&lt;p&gt;And as far as sample code is concerned so the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/index.html"&gt;nRF5340 Audio application&lt;/a&gt; already contains a complete audio pipeline (mic, codec, buffering), and you can reuse it and disable the Bluetooth part.&amp;nbsp;For your project, the most practical approach is maybe to keep the normal Audio DK mic and headphone path (nRF5340 to&amp;nbsp;CS47L63 over I2S) and exchange PCM audio with the Apollo over another interface such as SPI. This avoids rerouting I2S and is typically simpler and more robust, though it requires some custom code (as there is no ready made PCM over SPI example).&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Syed Maysum&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2S help on nRF5340 Audio DK</title><link>https://devzone.nordicsemi.com/thread/561340?ContentTypeID=1</link><pubDate>Tue, 17 Feb 2026 10:44:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2d004e8-bfa0-45f5-83fd-0307978229f1</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;The I&amp;sup2;S peripherial can TX and RX at the same time, so that looks possible.&lt;/p&gt;
&lt;p&gt;But 2 weeks is short even for an experienced engineer. I&amp;#39;ve spend about this time trying to teach someone here (in this forum) about the I&amp;sup2;S driver interface in zephyr, i.e. how the mem_slab stuff is supposed to work.&lt;/p&gt;
&lt;p&gt;There are generic I&amp;sup2;S sample codes available.&lt;/p&gt;
&lt;p&gt;But trying to port libmikmod or minimp3 taught me a lot more than those samples. Unfortunately that was&amp;nbsp; in an older Zephyr version for a 600MHz Cortex-M7. I don&amp;#39;t think minimp3 is fast enough on NRF5340 - but I have not run a test.&lt;/p&gt;
&lt;p&gt;BTW: MP3 decoder needs ~24KB stack IIRC. Might be worth a try, its just a big C header file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>