<?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 doesn&amp;#39;t wake up.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22417/saadc-doesn-t-wake-up</link><description>I mashed up RTC and SAADC examples. The files of the project are attached in the end of the post. The problem is that after the first iteration (I want to sample audio for 10ms from saadc every 3 sec) the SAADC don&amp;#39;t wake up and I have this error: &amp;quot;:ERROR</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 May 2017 09:18:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22417/saadc-doesn-t-wake-up" /><item><title>RE: SAADC doesn't wake up.</title><link>https://devzone.nordicsemi.com/thread/88155?ContentTypeID=1</link><pubDate>Tue, 30 May 2017 09:18:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85ccaf71-9336-4e63-b94a-fcbd99117297</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Most likely you get an error code because you are trying to initialize a module that is allready initialized (PPI, SAADC, etc.). You can use the method &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;described here&lt;/a&gt;, to check the error code and which function is failing.&lt;/p&gt;
&lt;p&gt;I suggest you do the following changes to your code (attached &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/17646.main.c"&gt;main.c&lt;/a&gt; with changes):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Disable PPI channel before
uninitializing SAADC&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Remove PPI initialization from RTC&lt;br /&gt;
callback&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initialize PPI and enable PPI channel
in main()&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You also need to re-enable interrupts for the COMPARE0 event, either by modifying the RTC interrupt handler, as described in &lt;a href="https://devzone.nordicsemi.com/question/48619/rtc-nrf51-sdk-example-matches-compare0-only-once/?answer=49056#post-id-49056"&gt;this post&lt;/a&gt;, or by calling &lt;code&gt;nrf_drv_rtc_cc_set()&lt;/code&gt; in the RTC callback.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>