<?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>The ADC settings on the nRF52840 with Zephyr are malfunctioning for certain parameters.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114835/the-adc-settings-on-the-nrf52840-with-zephyr-are-malfunctioning-for-certain-parameters</link><description>&amp;quot;The nRF52840 is developed using NCS v2.6.1. When the ADC is set with the reference voltage as (.reference = ADC_REF_VDD_1_4, .resolution = 10), the ADC sampling output is 0 and malfunctions. However, when set to (.reference = ADC_REF_VDD_1_4, .resolution</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Sep 2024 12:46:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114835/the-adc-settings-on-the-nrf52840-with-zephyr-are-malfunctioning-for-certain-parameters" /><item><title>RE: The ADC settings on the nRF52840 with Zephyr are malfunctioning for certain parameters.</title><link>https://devzone.nordicsemi.com/thread/503754?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2024 12:46:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa412639-4fff-4325-aa82-7682a848de4b</guid><dc:creator>Kenneth</dc:creator><description>[quote user="Mr.tang"]but the ADC is not working as expected.[/quote]
&lt;p&gt;Allways 0?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ADC settings on the nRF52840 with Zephyr are malfunctioning for certain parameters.</title><link>https://devzone.nordicsemi.com/thread/503474?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 22:06:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c90bb76-6fa7-4a53-bf40-918d9653101e</guid><dc:creator>Mr.tang</dc:creator><description>&lt;p&gt;Thank you for your reply. I tried your method, but the ADC is not working as expected. The overlay configuration is as follows:&lt;/p&gt;
&lt;p&gt;channel@7 {&lt;br /&gt; reg = &amp;lt;7&amp;gt;;&lt;br /&gt; zephyr,gain = &amp;quot;ADC_GAIN_1_6&amp;quot;;&lt;br /&gt; zephyr,reference = &amp;quot;ADC_REF_VDD_1_4&amp;quot;;&lt;br /&gt; zephyr,vref-mv = &amp;lt;750&amp;gt;;&lt;br /&gt; zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME_DEFAULT&amp;gt;;&lt;br /&gt; zephyr,input-positive = &amp;lt;NRF_SAADC_AIN6&amp;gt;; &lt;br /&gt; zephyr,input-negative = &amp;lt;NRF_SAADC_AIN7&amp;gt;; &lt;br /&gt; zephyr,resolution = &amp;lt;10&amp;gt;;&lt;br /&gt;};&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ADC settings on the nRF52840 with Zephyr are malfunctioning for certain parameters.</title><link>https://devzone.nordicsemi.com/thread/503446?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 16:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:790d89ab-5ea7-4fe9-bfa6-829cf5951837</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Adding this to the overlay this seems to work here. Sometimes the build system doesn&amp;#39;t pick up changes automatically, so if --pristinebuild doesn&amp;#39;t work, then try to delete the build folder after the change.&lt;/p&gt;
&lt;p&gt;Kenenth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ADC settings on the nRF52840 with Zephyr are malfunctioning for certain parameters.</title><link>https://devzone.nordicsemi.com/thread/503178?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2024 23:36:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:028b6b42-f4e6-456f-9ac3-47cf7367b85c</guid><dc:creator>Mr.tang</dc:creator><description>&lt;p&gt;&lt;span&gt;First of all, thank you very much for your reply. However, I also noticed .vref_mv and configured it accordingly. Regrettably, when the ADC parameters are set to (.reference = ADC_REF_VDD_1_4, .resolution = 10), the ADC collection does not work properly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To troubleshoot, I bypassed the devicetree ADC attribute configuration and directly used the adc_dt_spec structure variable to configure the ADC sampling parameters (struct adc_dt_spec adc_channels). Even with this configuration, it still doesn&amp;#39;t work properly.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ADC settings on the nRF52840 with Zephyr are malfunctioning for certain parameters.</title><link>https://devzone.nordicsemi.com/thread/503142?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2024 14:10:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8b44f4e-02c2-42d5-a018-7dc297e42386</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;When using VDD as reference, then you need to add .&lt;span&gt;zephyr,vref-mv&lt;/span&gt;&lt;span&gt; = &amp;lt;nnnn&lt;/span&gt;&lt;span&gt;&amp;gt;; where nnnn depends on the vdd/4 voltage (e.g. 750mV if VDD=3V). Make sure to use pristine build, it&amp;#39;s not allways that changes in devicetree is picked up otherwize.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>