<?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 offset calibration documentation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29310/nrf52832-saadc-offset-calibration-documentation</link><description>Hello all, 
 My use of the nrf_drv_saadc causes failures due to incompatible (driver) state, and seeing that other people are having various issues with it, before spending too much time on this issue (or creating a distributable repro), would like to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Jan 2018 07:50:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29310/nrf52832-saadc-offset-calibration-documentation" /><item><title>RE: nRF52832 SAADC offset calibration documentation</title><link>https://devzone.nordicsemi.com/thread/116614?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 07:50:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a195f7d6-6082-4a9e-ba8a-5bc9aca11550</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Ok, let me know when you have had time to look at this again. By the way, oversample will give correct results when combined with scan mode if BURST is enabled for all channels, as described in &lt;a href="https://devzone.nordicsemi.com/question/177142/saacd-scan-oversample/?answer=177418#post-id-177418"&gt;this thread&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC offset calibration documentation</title><link>https://devzone.nordicsemi.com/thread/116613?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 04:50:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e13026f7-f29f-4fd7-904c-8633a6eb072d</guid><dc:creator>Aleksandr Koltsoff</dc:creator><description>&lt;p&gt;Hello again. Ah, this is good to know (re low_power). The impact/operation of the low_power mode was not documented in the SDK API ref, and I&amp;#39;ve been using mostly defaults contained in &lt;code&gt;NRF_DRV_SAADC_DEFAULT_CONFIG&lt;/code&gt; so it&amp;#39;s been off so far.&lt;/p&gt;
&lt;p&gt;As to the SCAN mode issue, I&amp;#39;ve seen that answer but sadly it doesn&amp;#39;t seem to apply to our situation. I don&amp;#39;t start new sampling from the callback but from regular context after a FreeRTOS reschedule (some microseconds later), so should be safe from that particular race. Perhaps I&amp;#39;ll make an isolated reprocase for this later as well, but at the moment it&amp;#39;s unlikely we&amp;#39;ll switch back to that model (t_acq &amp;gt;= 10usec anomaly with SCAN, and no BURST support in that mode, so requires PPI to drive SAMPLE and with safe timing margins this results in much longer total sampling times than we now get with BURST+hw-oversample, although we also now get larger temporal de-correlation between samples across channels than we&amp;#39;d like but perhaps this is not a big issue for our current application).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC offset calibration documentation</title><link>https://devzone.nordicsemi.com/thread/116611?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 15:12:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:960d8814-1488-4e49-8d6e-98e7b1e7d371</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You are correct, it does not call uninit, but it use the low_power configuration mode introduced in SDK 12, which will stop the SAADC between samples to limit the EasyDMA current. This works mostly in the same way as your uninit/init method.&lt;/p&gt;
&lt;p&gt;If you have not already seen it, please have a look at &lt;a href="https://devzone.nordicsemi.com/question/119588/offset-in-saadc-samples-with-easy-dma-and-ble/?answer=166673#post-id-166673"&gt;this thread&lt;/a&gt; about the issue with SCAN mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC offset calibration documentation</title><link>https://devzone.nordicsemi.com/thread/116612?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 07:42:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c06524c5-7b2b-42c0-a0e1-e21fd3ad242c</guid><dc:creator>Aleksandr Koltsoff</dc:creator><description>&lt;p&gt;Thanks for the prompt reply, much appreciated!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m working on something else for a while and hope to return to this issue later. As we can&amp;#39;t easily feed external reference voltages with our design, will try to take the example code for a spin on a devkit and attempt to recreate the problem case there (and do it in a way that allows code sharing).&lt;/p&gt;
&lt;p&gt;The example code (referred in your answer) only calls saadc_init once however (does not nrf_drv_saadc_uninit between sampling runs, which is what I&amp;#39;m doing). The reason why I&amp;#39;m doing init+uninit is related to avoiding extra power consumption. While the SDK API documentation does not document whether there are power use impacts on having nrf_drv_saadc_init called, it felt safer to do an nrf_drv_saadc_uninit after each acquisition run to save power. If this is not needed (there is no power impact on having called _init once at start only), that would be nice to know.&lt;/p&gt;
&lt;p&gt;The &amp;quot;SCAN+DMA&amp;quot; issue is not really related to the offset calibration issue, sorry for the confusion. It was the ideal mode of operation that we used for acquisition in general, but had to switch to single channel acquisition with BURST since with SCAN+DMA the channels sometimes get swapped (noticed that other people have had similar issue in some cases, but there was no answer that worked for us). But, this is a separate issue and not related to the offset calibration.&lt;/p&gt;
&lt;p&gt;Will report back later (perhaps in a week or two).&lt;/p&gt;
&lt;p&gt;br,
ak.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SAADC offset calibration documentation</title><link>https://devzone.nordicsemi.com/thread/116610?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 13:10:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffe1fb21-9a1a-418e-bf0a-1c861ea3778f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;It is recommended to at least do calibration on startup, and on major temperature changes. How often you should do calibration will depend on your application needs, but every 1-2 degrees change should be ok.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This will be chip dependent. Your samples will be offset by the offset error in each reading. How this affects your readings, compared to the ideal value, will depend on other error sources. I would recommend you to input 0 to the SAADC, take some samples, to offset calibration and take new samples. Then compare the samples before and after offset to see get the offset error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The times used by offset calibration is dependent on the configured aquisition time. We do not have any available values for this in the PS, but you can find some typical values in the table on &lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/saadc_low_power#about-this-project"&gt;this GitHub page&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The calibration is valid until chip reset.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;What do you mean by this: &lt;em&gt;&amp;quot;SCAN+DMA cannot be used since channels are swapped occasionally&amp;quot;&lt;/em&gt;? What failure code is returned? The &lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/saadc_low_power"&gt;low-power SAADC example&lt;/a&gt; on our GitHub shows how to do offset calibration on SAADC that is turned off between samples, to save power.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let me know if you have some follow-up questions or comments.&lt;/p&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>