<?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>nRF52832 SAADC and BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46784/nrf52832-saadc-and-ble</link><description>Hello, 
 I&amp;#39;m using following code to read two channels of SAADC. It works fine when device is not connected to BLE central device. As soon as it&amp;#39;s connected, the saadc_callback function stops executing despite the fact that nrf_drv_saadc_sample(); returns</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 May 2019 10:02:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46784/nrf52832-saadc-and-ble" /><item><title>RE: nRF52832 SAADC and BLE</title><link>https://devzone.nordicsemi.com/thread/186630?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 10:02:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7449ed83-3160-44a6-ab27-0f1b99c49dd4</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Priority 0 is the absolute highest priority (and should not be used), it would make more sense if timer use for instance 7 and adc use 6. Ref:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=3_4_2_0_15_1"&gt;https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=3_4_2_0_15_1&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC and BLE</title><link>https://devzone.nordicsemi.com/thread/186297?ContentTypeID=1</link><pubDate>Fri, 10 May 2019 07:59:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43d1e041-713f-4d33-8d89-b2065f0f4aa6</guid><dc:creator>Aftab</dc:creator><description>&lt;p&gt;I changed my code to use Timer 4 to call ADC conversions through PPI instead of calling from APP_TIMER.&lt;/p&gt;
&lt;p&gt;I can see the function works fine when called from &amp;quot;while&amp;quot; loop of main. But this causes unwanted delays in other BLE functions. So I called it from Timer 4 (used for ADC as well) after, say 2 sec.&amp;nbsp;Also set the priority like:&amp;nbsp;&lt;strong&gt;NVIC_SetPriority(TIMER4_IRQn, 0);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But it still doesn&amp;#39;t work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/kenneth"&gt;Kenneth&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC and BLE</title><link>https://devzone.nordicsemi.com/thread/185971?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 12:41:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:393c7c05-e7e0-4262-9c2f-6b605a04f340</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;If you are calling the function from an app_timer or other peripheral interrupt, then you would need to check the interrupt priority level of the app_timer or peripheral interrupt you set during initialization. If you are calling the function from a while()-loop in main(), then it&amp;#39;s not running from an interrupt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC and BLE</title><link>https://devzone.nordicsemi.com/thread/185856?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 08:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c98e7ec5-dff6-45df-8434-7d94c52b14e3</guid><dc:creator>Aftab</dc:creator><description>&lt;p&gt;How to check the priority level of a function?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/kenneth"&gt;Kenneth&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC and BLE</title><link>https://devzone.nordicsemi.com/thread/185569?ContentTypeID=1</link><pubDate>Mon, 06 May 2019 18:43:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b7f3bd4-7216-40a7-8f6e-8b0ebdd7dad8</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Can it be a interrupt priority issue, where you are trying to wait for a saadc callback from a function that is at the same interrupt priority level? In such case it is not possible for a interrupt to preempt an interrupt of same priority level.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC and BLE</title><link>https://devzone.nordicsemi.com/thread/185513?ContentTypeID=1</link><pubDate>Mon, 06 May 2019 13:29:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8fd417f-d47a-409b-992d-b0d688d30ea7</guid><dc:creator>Aftab</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt;, I am having a different issue all together in the same code. Unfortunately the thread you are referring does not answer my question.&lt;/p&gt;
&lt;p&gt;My issue is not SAADC basic function, rather SAADC is working in certain conditions while not working in other conditions.&amp;nbsp;There are two places from where I&amp;#39;m calling&amp;nbsp;&lt;strong&gt;saadc_voltage_get_drive()&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;1. &lt;strong&gt;main()&lt;/strong&gt; function at startup, when &lt;strong&gt;saadc_voltage_get_drive()&amp;nbsp;&lt;/strong&gt;is called, I can clearly see&amp;nbsp;&lt;strong&gt;saadc_callback()&lt;/strong&gt; being called and I can clearly see ADC values.&lt;/p&gt;
&lt;p&gt;2. But I call the same&amp;nbsp;&lt;span&gt;&lt;strong&gt;saadc_voltage_get_drive()&lt;/strong&gt; from another function periodically, &lt;strong&gt;saadc_callback()&lt;/strong&gt; does not fire. It seems like ADC buffer full event takes infinite time to complete, hence I don&amp;#39;t get right values, instead previously converted value is returned.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So my problem is why &lt;strong&gt;saadc_callback()&lt;/strong&gt; behaves differently when called from different function, periodically.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC and BLE</title><link>https://devzone.nordicsemi.com/thread/184485?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 08:53:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4e17011-2622-4757-9054-c6bd84787ded</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;You&amp;#39;ve already posted this in another thread:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/45259/nrf52832-saadc/184285#184285"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/45259/nrf52832-saadc/184285#184285&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>