<?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>Adding additional channels to FDC2X1X sample code on nRF9160 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113975/adding-additional-channels-to-fdc2x1x-sample-code-on-nrf9160-dk</link><description>Hello, 
 I have gotten the Zephyr FDC2X1X sample code running with a single FDC2214 I2C capacitive sensor sampling two out of the four channels. The device tree for this configuration is such: 
 
 I would like to read the other two channels of the sensor</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Aug 2024 21:55:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113975/adding-additional-channels-to-fdc2x1x-sample-code-on-nrf9160-dk" /><item><title>RE: Adding additional channels to FDC2X1X sample code on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/498702?ContentTypeID=1</link><pubDate>Fri, 16 Aug 2024 21:55:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b8c3c7f-b0c7-40ea-9056-fb6be247a4be</guid><dc:creator>ParkerMcD</dc:creator><description>&lt;p&gt;&lt;span&gt;Figured it out&lt;/span&gt;&lt;span&gt;. Turns out the driver correctly puts the FDC2214 in autoscanning mode&amp;nbsp;&lt;/span&gt;&lt;span&gt;(aka device automatically samples and converts channels&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;, but it doesn&lt;/span&gt;&lt;span&gt;&amp;#39;t update the RR&lt;/span&gt;&lt;span&gt;_SEQUENCE&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;:13&lt;/span&gt;&lt;span&gt;] correctly. By default it sets RR_SEQUENCE to 0b00 which only enables channels 0 &amp;amp; 1 to be converter. By setting RR_SEQUENCE to 0b10 (as shown in the datasheet) all four channels get read out correctly.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This can be achieved by settings rr-sequence = &amp;lt;2&amp;gt;; in the devicetree. More devicetree options are shown in ti,fdc2x1x.yaml.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Cheers,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Parker&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding additional channels to FDC2X1X sample code on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/498667?ContentTypeID=1</link><pubDate>Fri, 16 Aug 2024 14:36:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c82323ec-1412-4580-b646-09c74a3f0d7d</guid><dc:creator>ParkerMcD</dc:creator><description>&lt;p&gt;Also I have verified that this is a software issue as I can use Ti&amp;#39;s firmware to read all four channels in autoscan mode via their development kit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding additional channels to FDC2X1X sample code on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/498666?ContentTypeID=1</link><pubDate>Fri, 16 Aug 2024 14:35:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebed65ee-676a-48ce-839d-e285596274ca</guid><dc:creator>ParkerMcD</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have started setting breakpoint and debugging the driver. I can see the driver is correctly calling&amp;nbsp;&lt;span&gt;static int fdc2x1x&lt;/span&gt;&lt;span&gt;_init&lt;/span&gt;&lt;span&gt;_config&lt;/span&gt;&lt;span&gt;(const struct device &lt;/span&gt;&lt;span&gt;*dev&lt;/span&gt;&lt;span&gt;) and looping through all four channels. Likewise, when it goes to read channels, it correctly loops through all four channels one at a time.&lt;em&gt;&lt;/em&gt; I probed each of the fdc2214 channel outputs on the circuit board and only channel 0/1 are actually generating an output signal. My current hypothesis is the initialization function is somehow not enabling these channels correctly and that is why the readout comes back with an out of range result (as opposed to there being an issue with the readout function). I will try using the active-channel property instead of autoscan when I get to the lab this morning, but I suspect the issue is with initialization not the readout mode. But who knows!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Cheers,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Parker&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding additional channels to FDC2X1X sample code on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/498628?ContentTypeID=1</link><pubDate>Fri, 16 Aug 2024 12:31:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ff384bb-1f5b-4470-83d4-03e73de9aa5a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Parker,&lt;/p&gt;
&lt;p&gt;I do not have experience with the sensor, and this driver was not worked on by Nordic.&amp;nbsp;However, I see that in addition to the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/zephyr/samples/sensor/fdc2x1x/README.html"&gt;example documentation&lt;/a&gt;&amp;nbsp;describing just channels you also need to set the &lt;code&gt;fdc2x14&lt;/code&gt; in your device tree overlay, which you have.&lt;/p&gt;
&lt;p&gt;Do you see anything interesting from debugging? Also, are you able to use one of the last two channels if you specify a specific channel using the &lt;code&gt;active-channel&lt;/code&gt; property instaed of &lt;code&gt;autocan&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>