<?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 Master using EasyDMA</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72457/i2s-master-using-easydma</link><description>Hello. 
 My application is an I2S Master that transmits audio data to an audio codec. I need to setup a transmit buffer using EasyDMA. Is EasyDMA used by default when using the I2S Master code? If I need to specify using EasyDMA, do I simply instantiate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Mar 2021 14:30:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72457/i2s-master-using-easydma" /><item><title>RE: I2S Master using EasyDMA</title><link>https://devzone.nordicsemi.com/thread/299047?ContentTypeID=1</link><pubDate>Wed, 10 Mar 2021 14:30:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0f6e96d-cdd5-4451-bb02-b89eb83df8bc</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="RobHel"]Are the 16 most significant bits one channel, and the 16 least significant bits the other channel, and are these each uint16_t&amp;#39;s?[/quote]
&lt;p&gt;&amp;nbsp;Yes, see the&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;prepare_tx_data() function which sets up the initial&amp;nbsp;buffers:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1615386432807v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;The reason that both the tx and rx buffers is multiplied&amp;nbsp;is to get double-buffering. Which means that the driver will switch buffers in the callback handler while it process the data, this makes it possible to continue&amp;nbsp;to receive&amp;nbsp;data while the other data is processed.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2S Master using EasyDMA</title><link>https://devzone.nordicsemi.com/thread/298836?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 18:26:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9e2f58f-765c-4c47-8547-771c891da6f9</guid><dc:creator>RobHel</dc:creator><description>&lt;p&gt;Hi Jared. Thanks for the response and pointing me to that example. It does help.&lt;/p&gt;
&lt;p&gt;One thing that still isn&amp;#39;t clear to me is how the uint32_t p_tx_buffer is organized composed of two 16-bit channels. Are the 16 most significant bits one channel, and the 16 least significant bits the other channel, and are these each uint16_t&amp;#39;s? In the example you pointed me to, the tx buffer (m_buffer_tx) is an array, two uint32_t wide, by&amp;nbsp;I2S_DATA_BLOCK_WORDS long. In this case, is one uint32_t the left channel and one uint32_t the right channel, per data word? Or am I mis-understanding the code?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also found an example using Zephyr where the left and right channels were int16_t&amp;#39;s so they varied from -0x7fff to +0x7fff.&lt;/p&gt;
&lt;p&gt;Can you elaborate on how the&amp;nbsp;&lt;span&gt;p_tx_buffer is organized? Is each channel a uint16_t or int16_t?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rob&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2S Master using EasyDMA</title><link>https://devzone.nordicsemi.com/thread/298419?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 14:11:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d919373-1270-402f-bbae-700bec685c6c</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
[quote user=""]Is EasyDMA used by default[/quote]
&lt;p&gt;&amp;nbsp;Yes&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;code&gt;Where do I handle the interrupts that are called using the I2S Master + EasyDMA?&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;If you use the I2S driver then you pass a callback handler during initialization of the module that is called by the driver when a I2S interrupt is generated. &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/i2s_example_loopback.html?cp=7_1_4_6_15"&gt;Have you seen the I2S example in the SDK&lt;/a&gt;? It show how the driver is used, it would answer most of your questions.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared m&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>