<?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>One-off, low accuracy measurement of battery voltage using ADC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1746/one-off-low-accuracy-measurement-of-battery-voltage-using-adc</link><description>I&amp;#39;ve seen various threads here with sample code attached that show how to set up a timer to measure a battery voltage periodically. They also seem to use an external crystal for greater accuracy. 
 What if I need neither of them? How do I do a single</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Feb 2014 12:55:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1746/one-off-low-accuracy-measurement-of-battery-voltage-using-adc" /><item><title>RE: One-off, low accuracy measurement of battery voltage using ADC</title><link>https://devzone.nordicsemi.com/thread/7649?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2014 12:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a1a5ed1-e736-4958-a7e7-a35ad0aa7f3d</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Sorry! I&amp;#39;d been setting up the ADC stuff &lt;em&gt;before&lt;/em&gt; the softdevice was enabled in my code. With it after, this works as expected. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: One-off, low accuracy measurement of battery voltage using ADC</title><link>https://devzone.nordicsemi.com/thread/7648?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2014 09:32:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f32e3dd-2954-439e-bd20-f0bd53e61f9c</guid><dc:creator>Balaji Srinivasan</dc:creator><description>&lt;p&gt;Hi Elliot,&lt;/p&gt;
&lt;p&gt;I tried your code and it works fine at my side with the SoftDevice enabled. I do hit the breakpoint at ADC_IRQHandler. Did you check if sd_nvic_SetPriority and sd_nvic_EnableIRQ are returning any error codes others than NRF_SUCCESS (0x00)?&lt;/p&gt;
&lt;p&gt;Also if you have the SoftDevice disabled, please use the CMSIS APIs NVIC_SetPriority and NVIC_EnableIRQ instead of the SoftDevice APis.&lt;/p&gt;
&lt;p&gt;Cheers,
Balaji&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>