<?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>Need help with nRF52 I2S EasyDMA - RXD Buffer Pointer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10593/need-help-with-nrf52-i2s-easydma---rxd-buffer-pointer</link><description>Hi, 
 I&amp;#39;m trying to setup NRF52 with a microphone (ICS-43432) using I2S and easyDMA. I&amp;#39;m new to embedded software development, and would very much appreciate your help and patience. 
 My plan is to use just one (left) channel for receiving the data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 13 May 2017 02:32:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10593/need-help-with-nrf52-i2s-easydma---rxd-buffer-pointer" /><item><title>RE: Need help with nRF52 I2S EasyDMA - RXD Buffer Pointer</title><link>https://devzone.nordicsemi.com/thread/39435?ContentTypeID=1</link><pubDate>Sat, 13 May 2017 02:32:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3923ca27-9e1d-46a3-bccf-556f9cedcb6e</guid><dc:creator>???</dc:creator><description>&lt;p&gt;Hi Anders,&lt;/p&gt;
&lt;p&gt;Is there a full version of the ADPCM encoding and decoding of the document can provide reference, thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need help with nRF52 I2S EasyDMA - RXD Buffer Pointer</title><link>https://devzone.nordicsemi.com/thread/39434?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 13:04:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04d3a9e6-49c2-495a-b0d8-ad431d6e6b01</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;The codec is open source. I am not sure if you can use it with i2s. I guess the audio signal must be in pcm format for it to work. I am not sure where you can download the codec, so i will attach it to my answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need help with nRF52 I2S EasyDMA - RXD Buffer Pointer</title><link>https://devzone.nordicsemi.com/thread/39433?ContentTypeID=1</link><pubDate>Sat, 05 Dec 2015 02:27:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96780d35-f00c-41f2-973a-80b7115bd12a</guid><dc:creator>Shashi</dc:creator><description>&lt;p&gt;Hi Anders,&lt;/p&gt;
&lt;p&gt;Thank you! That info was very helpful. I look forward to the example project and i2s driver.&lt;/p&gt;
&lt;p&gt;From &lt;a href="https://devzone.nordicsemi.com/question/3440/how-do-i-calculate-throughput-for-a-ble-link/"&gt;this thread&lt;/a&gt;, I can get a peak throughput of 32kbps to 128kbps depending upon the connection interval and number of packets per interval. That means with a 24-bit MEMS microphone, I would have to use a sample rate of &amp;lt;2khz. I will give this a try and look at the audio quality received on my other device via BLE.&lt;/p&gt;
&lt;p&gt;I noticed that &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRFready-Voice-Input-Module"&gt;nRFready Voice Input Module&lt;/a&gt; uses ADPCM codec for audio compression. Is that codec available in the SDK or somewhere? Is it possible to use ADPCM codec with nRF52 when using i2s interface and S132? I understand that CPU is not always available as some CPU cycles will be taken by S132.&lt;/p&gt;
&lt;p&gt;Also, If I need higher quality audio, (as a non-ideal solution) I could have some onboard external flash memory (as SPI slave) that I can write my 10-second high-quality audio clips and send them via BLE asynchronously.&lt;/p&gt;
&lt;p&gt;Thank you again for your excellent help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need help with nRF52 I2S EasyDMA - RXD Buffer Pointer</title><link>https://devzone.nordicsemi.com/thread/39432?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 13:37:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3dc293e-e722-4662-b214-04cd5b391337</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;1 -
This should be a statically allocated area of RAM. It will contain data in &amp;quot;chunks&amp;quot; of 32 bits. Whether you implement an ArrayList structure type with 4 bytes, or one array of uint32_t is up to you. If you choose the latter, you must extract the data manually from each 32 bit chunk. The allocation will look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    static uint32_t m_rx_buf[I2S_BUFFER_SIZE];
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Remember that you can choose whether the data is going to be 8,16 or 24 bits. If you choose 16 bits, you can extract the two 16 bit words from a uint32_t varible &amp;quot;buffer&amp;quot; like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    uint16_t actual_sample_left   = ((uint16_t const *)buffer)[0];
    uint16_t actual_sample_right   = ((uint16_t const *)buffer)[1];
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2 -  This really depends on how you plan to do the sampling. In BLE, you can send 20 bytes in one packet. It will make sense to gather 20 bytes at a time, and then send these bytes out. However, if you want to continue to sample audio while reading the previous sample from RAM, you must implement double buffering. You will in this case need two buffer of 20 bytes each, and switch between the two buffers when you get an interrupt saying that 20 bytes have been received.&lt;/p&gt;
&lt;p&gt;3 - Yes. You can see it on the list of fixed anomalies in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.errata.v1.1.0/err_832.html"&gt;errata&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For others, &lt;a href="http://infocenter.nordicsemi.com/topic/nrf52.v1.7/Chunk1082146455.html?cp=1_1_0_40#concept_z2v_24y_vr"&gt;here&lt;/a&gt; is the link to the i2s section of the OPS&lt;/p&gt;
&lt;p&gt;The i2s driver and example project will be released in the next SDK. (Probably just before Christmas this year)&lt;/p&gt;
&lt;p&gt;adpcm codec: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dvi_5F00_adpcm.rar"&gt;dvi_adpcm.rar&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>