<?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>Buffer order swap of SAADC used with NRF Mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63074/buffer-order-swap-of-saadc-used-with-nrf-mesh</link><description>Hello, 
 I am using NRF52840 with SDK 16.0.0 and Mesh SDK 4.1.0 
 .I am trying to use SAADC with BLE Mesh(SDK 4.1.0). I used default example of SAADC with multiple channel available in SDK(16.0.0) 
 Example path: nRF5_SDK_16.0.0_98a08e2\examples\peripheral</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Jul 2020 03:55:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63074/buffer-order-swap-of-saadc-used-with-nrf-mesh" /><item><title>RE: Buffer order swap of SAADC used with NRF Mesh</title><link>https://devzone.nordicsemi.com/thread/258215?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 03:55:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9aa968f2-30bb-4cbc-ae65-c3091014d3c6</guid><dc:creator>bivay</dc:creator><description>&lt;p&gt;Sorry for late response, We are testing your solution again, and we found that node SAADC buffer not swapped since 2 days, may this work, we are observing this and let&amp;nbsp; you know result.&lt;/p&gt;
&lt;div style="bottom:0px;font-weight:400;left:0px;right:0px;top:0px;" id="mouseposition-extension-element-full-container"&gt;
&lt;div style="background:rgba(255, 255, 255, 0.7);color:#000000;cursor:default;display:none;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:12px;height:0px;position:absolute;width:0px;" id="mouseposition-extension-element-rect-display"&gt;
&lt;pre style="background-color:rgba(255, 255, 255, 0.7);color:#000000;text-align:center;"&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre style="background:#ffffff;border-color:#222222 black #333333;border-radius:3px;border-style:solid;border-width:1px;color:#222222;cursor:default;display:none;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:12px;line-height:14px;padding:3px;position:absolute;" id="mouseposition-extension-element-coordinate-display"&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buffer order swap of SAADC used with NRF Mesh</title><link>https://devzone.nordicsemi.com/thread/257861?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 13:28:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35efa336-5c88-4c11-ad51-96fcf64c9b79</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Can you post your project for a review and for me to reproduce the issue? There should not be any way (at least that I&amp;#39;m aware of) for a buffer swap to happen if this workaround is used, but it could be something else in your application that causes this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buffer order swap of SAADC used with NRF Mesh</title><link>https://devzone.nordicsemi.com/thread/257726?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 07:56:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a10d1576-0c90-4205-9bc4-1b09c95aa73b</guid><dc:creator>bivay</dc:creator><description>&lt;p&gt;I have tried your solution, initially works well, but after few hours buffer get swapped.&lt;/p&gt;
&lt;p&gt;I have tested with below conditions:&lt;/p&gt;
&lt;p&gt;1) Used SAADC example of SDK with 1ms Interval of 5 adc, and sample buffer of 5&lt;/p&gt;
&lt;p&gt;2)&lt;span&gt;&amp;nbsp;Used SAADC example of SDK with 1ms Interval of 5 adc, and sample buffer of&amp;nbsp;100&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3) Added Brust On and oversampling to 4x&amp;nbsp;&lt;span&gt;with 1ms Interval of 5 adc, and sample buffer of 100&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;4) Your Solution Of START_EVENT with PPI (added on 3rd condition)&amp;nbsp;&lt;span&gt;with 1ms Interval of 5 adc, and sample buffer of 100&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In all cases buffer get swapped&amp;nbsp;after 5-6 hours of average.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please help me to solve this issue.&lt;/p&gt;
&lt;div style="bottom:0px;font-weight:400;left:0px;right:0px;top:0px;" id="mouseposition-extension-element-full-container"&gt;
&lt;div style="background:rgba(255, 255, 255, 0.7);color:#000000;cursor:default;display:none;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:12px;height:0px;position:absolute;width:0px;" id="mouseposition-extension-element-rect-display"&gt;
&lt;pre style="background-color:rgba(255, 255, 255, 0.7);color:#000000;text-align:center;"&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre style="background:#ffffff;border-color:#222222 black #333333;border-radius:3px;border-style:solid;border-width:1px;color:#222222;cursor:default;display:none;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:12px;line-height:14px;padding:3px;position:absolute;" id="mouseposition-extension-element-coordinate-display"&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buffer order swap of SAADC used with NRF Mesh</title><link>https://devzone.nordicsemi.com/thread/257699?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 04:14:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e1a8d5c-243e-4695-89dd-4f78ca561903</guid><dc:creator>bivay</dc:creator><description>&lt;p&gt;Thanks Your this solution, I have a doubt about this that I only have to change on nrfx_saadc.c to comment the&amp;nbsp; line 128 ,&lt;/p&gt;
&lt;p&gt;nrf_saadc_task_trigger(NRF_SAADC_TASK_START);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and add above solution in my application code.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;div style="bottom:0px;font-weight:400;left:0px;right:0px;top:0px;" id="mouseposition-extension-element-full-container"&gt;
&lt;div style="background:rgba(255, 255, 255, 0.7);color:#000000;cursor:default;display:none;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:12px;height:0px;position:absolute;width:0px;" id="mouseposition-extension-element-rect-display"&gt;
&lt;pre style="background-color:rgba(255, 255, 255, 0.7);color:#000000;text-align:center;"&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;pre style="background:#ffffff;border-color:#222222 black #333333;border-radius:3px;border-style:solid;border-width:1px;color:#222222;cursor:default;display:none;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:12px;line-height:14px;padding:3px;position:absolute;" id="mouseposition-extension-element-coordinate-display"&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Buffer order swap of SAADC used with NRF Mesh</title><link>https://devzone.nordicsemi.com/thread/257318?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2020 09:43:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b27f490c-f88a-4de7-90f7-47986db53bcf</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you are referring to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/20291/offset-in-saadc-samples-with-easy-dma-and-ble/79053#79053"&gt;this solution&lt;/a&gt; with connecting END event to START task using PPI, this is not used in any SDK examples as far as I know.&lt;/p&gt;
&lt;p&gt;The SDK SAADC example uses PPI to trigger the SAMPLE task, but this is what&amp;#39;s causing the issue in the first place. You need to setup an additional PPI channel to trigger the START task on END event. Something like this should work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_ppi_channel_t saadc_buffer_swap_ppi_channel;
nrf_drv_ppi_channel_alloc(&amp;amp;saadc_buffer_swap_ppi_channel);
nrf_drv_ppi_channel_assign(saadc_buffer_swap_ppi_channel,
                           (uint32_t)&amp;amp;NRF_SAADC-&amp;gt;EVENTS_END,
                           (uint32_t)&amp;amp;NRF_SAADC-&amp;gt;TASKS_START);
nrf_drv_ppi_channel_enable(saadc_buffer_swap_ppi_channel);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When adding this to the application, you may also need to remove the triggering of the START task in the interrupt handler (nrfx_saadc.c:128 in SDK 16.0.0).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>