<?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>NPM1300 Integration with custom board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107471/npm1300-integration-with-custom-board</link><description>Hi 
 I&amp;#39;ve been using the NPM1300 with custom code and would like to instead use the built in libraries used in the npm1300_fuel_gauge sample. 
 
 the modifications i made were: 
 1) Add the following to my prj.conf 
 
 2) Update my custom board dts file</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Jan 2024 21:00:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107471/npm1300-integration-with-custom-board" /><item><title>RE: NPM1300 Integration with custom board</title><link>https://devzone.nordicsemi.com/thread/465449?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2024 21:00:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20fac0cb-1c8a-4cab-ab80-52ee15f528aa</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;After setting the shield, you can extract the same information from compiled dts and put it in the overlay for your board. Remember to add overlay for the build configuration.&lt;/p&gt;
&lt;p&gt;As we are using EK, so the shield variable provides the dts info for the shield.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NPM1300 Integration with custom board</title><link>https://devzone.nordicsemi.com/thread/465448?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2024 20:58:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddeb3a2f-dbd0-43a6-ac6e-69a193241596</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;I got the dts info from the compiled zephyr dts, and simply put it in the overlay. I didn&amp;#39;t have to mention Arduino:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1705957118902v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NPM1300 Integration with custom board</title><link>https://devzone.nordicsemi.com/thread/464886?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2024 16:38:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0d5d6b9-b8cd-4c06-8517-f596d5719a10</guid><dc:creator>robsrick</dc:creator><description>&lt;p&gt;Okay thanks i&amp;#39;ve made a bit of progress here. So to get it to compile i had to&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. update my root CMakeLists.txt to include the line&lt;/p&gt;
&lt;div style="background-color:#1e1e1e;color:#d4d4d4;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#569cd6;"&gt;set&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;(SHIELD npm1300_ek)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;2. ensure the I2C i&amp;#39;ve got my npm1300 connected to is defined as an arduino_i2c like so:&lt;/p&gt;
&lt;div style="background-color:#1e1e1e;color:#d4d4d4;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#4ec9b0;"&gt;arduino_i2c&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;: &amp;amp;&lt;/span&gt;&lt;span style="color:#4ec9b0;"&gt;i2c1&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;compatible&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#569cd6;"&gt;&amp;quot;nordic,nrf-twim&amp;quot;&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;status&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; = &lt;/span&gt;&lt;span style="color:#569cd6;"&gt;&amp;quot;okay&amp;quot;&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;pinctrl-0&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; = &amp;lt;&amp;amp;&lt;/span&gt;&lt;span style="color:#4ec9b0;"&gt;i2c1_default&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;pinctrl-1&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; = &amp;lt;&amp;amp;&lt;/span&gt;&lt;span style="color:#4ec9b0;"&gt;i2c1_sleep&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;pinctrl-names&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; = &lt;/span&gt;&lt;span style="color:#ce9178;"&gt;&amp;quot;default&amp;quot;&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;, &lt;/span&gt;&lt;span style="color:#ce9178;"&gt;&amp;quot;sleep&amp;quot;&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;it then adds the npm1300 definitions to the compiled zephyr.dts in the build folder.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you explain how this works? I&amp;#39;m not really clear why i have to use arduino_i2c or set a shield rather than just adding my own definitions for the NPM1300 in the device tree directly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NPM1300 Integration with custom board</title><link>https://devzone.nordicsemi.com/thread/464874?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2024 15:27:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c89f31f1-befe-4f7c-9c3c-5cf27a61e09b</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I suggest you to start with the fuel-gauge sample&lt;/p&gt;
&lt;p&gt;and build for one of the supported boards,&lt;/p&gt;
&lt;p&gt;and then build for your custom board after modification on the dts through overlay.&lt;/p&gt;
&lt;p&gt;I am also not sure about your custom code.&lt;/p&gt;
&lt;p&gt;Nonetheless, as per the log message you have attached:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1705591593525v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It looks like something missing in the dts. Please check what ord_115 is in the generated devicetree and then see if it is correctly configured in the dts.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;/BR, Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>