<?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>SAADC Driver Issues</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17456/saadc-driver-issues</link><description>I have run into two SAADC issues on the nRF52832 using SDK v12.1.0. Any recommendations on how to fix them? 
 Issue 1: 
When the Keil compiler optimization is turned up to level 3 (-O3), the nrf_drv_saadc_abort() function always times out. This is due</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Dec 2016 15:10:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17456/saadc-driver-issues" /><item><title>RE: SAADC Driver Issues</title><link>https://devzone.nordicsemi.com/thread/67080?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 15:10:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1e4343f-06a4-4ec0-8b39-f1b5e7cc506c</guid><dc:creator>abkirchhoff</dc:creator><description>&lt;p&gt;Jorgen,
Thanks for following up. Let me know when you hear back.
Austin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Driver Issues</title><link>https://devzone.nordicsemi.com/thread/67074?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 14:33:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0da320c7-b822-49cf-9d98-f77c7dafb2c9</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Sorry for not answering you quicker. I have reported the issues internally to the developers, and will get back to you as soon as I hear back. There seems to be a missing if case to handle this special case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Driver Issues</title><link>https://devzone.nordicsemi.com/thread/67079?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2016 15:38:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53a9f028-5468-4866-8ccc-466d74c3e28c</guid><dc:creator>abkirchhoff</dc:creator><description>&lt;p&gt;For issue 2, the issue only occurs if my buffer size is one and I only use one active ADC channel. I will update my post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Driver Issues</title><link>https://devzone.nordicsemi.com/thread/67078?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2016 15:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02709f92-6790-4ef6-8b7c-7a3ca51c87c7</guid><dc:creator>abkirchhoff</dc:creator><description>&lt;p&gt;Eddie,
You nailed it. I defined m_cb.adc_state as volatile and the abort issue (issue 1) is fixed. Thanks.&lt;/p&gt;
&lt;p&gt;Issue 2 still remains (for any optimization level).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Driver Issues</title><link>https://devzone.nordicsemi.com/thread/67077?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2016 15:29:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4dd56ae-b4d4-42d9-a366-bc4547b83b2d</guid><dc:creator>Eddie</dc:creator><description>&lt;p&gt;For the first issue, can you try declaring m_cb.adc_state as volatile?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Driver Issues</title><link>https://devzone.nordicsemi.com/thread/67076?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2016 15:01:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e02b4295-a841-4d95-a5a0-5efc1afea89d</guid><dc:creator>abkirchhoff</dc:creator><description>&lt;p&gt;Jorgen,&lt;/p&gt;
&lt;p&gt;Thanks for looking into this. I have uploaded an example project that demonstrates the two issues. The example is in examples/peripheral/saadc. Normally the example prints an ADC result once a second. I added two definitions in main.c that if enabled will run code to display the selected issue. I used the arm5_no_packs project. I had to add DEBUG and DEBUG_NRF_USER to the project definitions to get issue 1 to occur.&lt;/p&gt;
&lt;p&gt;Austin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Driver Issues</title><link>https://devzone.nordicsemi.com/thread/67075?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2016 13:33:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:683023f2-cc34-40c6-a423-04455710be55</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi, I ported &lt;a href="https://devzone.nordicsemi.com/question/97728/saadc-scan-mode-sample-order-is-not-always-consistent/?answer=97783#post-id-97783"&gt;this example&lt;/a&gt; to &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/e_5F00_app_5F00_uart_5F005F00_saadc_5F00_timer_5F00_driven_5F005F00_scan_5F00_mode_5F005F00_abort_5F00_test_5F005F00_SDK12.zip"&gt;SDK12&lt;/a&gt;. I could not reproduce the first issue. Can you post some code (or preferrably, upload the whole project) showing how you configure and initialize the SAADC? I have not heard of this issue before. Is the second issue only occuring if optimization is set to level 3 aswell?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>