<?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>Thingy91X npm1300 fuel gauge sample configuration/build problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123946/thingy91x-npm1300-fuel-gauge-sample-configuration-build-problem</link><description>The Nordic Thingy:91X board has a Nordic nmp1300 pmic device, but the samples do not support the board (a lot of time would be saved it they did); 
 https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/pmic/native/npm13xx_fuel_gauge/README.html</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Sep 2025 05:20:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123946/thingy91x-npm1300-fuel-gauge-sample-configuration-build-problem" /><item><title>RE: Thingy91X npm1300 fuel gauge sample configuration/build problem</title><link>https://devzone.nordicsemi.com/thread/547832?ContentTypeID=1</link><pubDate>Fri, 05 Sep 2025 05:20:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec9705c6-d6a5-4eb5-af06-93228a3775fa</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;Thanks for the link to the asset-tracker-template, seems that contains the battery model.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/Asset-Tracker-Template/blob/main/app/src/modules/power/lp803448_model.h"&gt;Asset-Tracker-Template lp803448_model.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To be frank, I don&amp;#39;t think, that using the nRF53 for the fuel guage is easy, if possible at all.&lt;/p&gt;
&lt;p&gt;The Thingy:91X uses i2c a lot from the nRF91 and I&amp;#39;m not aware, that i2c supports a &amp;quot;multi-master-mode&amp;quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;nbsp;BLE and the battery service&lt;/p&gt;
&lt;p&gt;My plan was to use it for a better battery level value, but I send that over cellular to my server. As I wrote above, I don&amp;#39;t think it makes sense to change the app in a way, to make the nRF53 the i2c master instead of the nRF91. What I would try (but I don&amp;#39;t need that on the BLE) is to enable the i2c device mode on the nRF53 and then transfer the battery level to that nRF53.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91X npm1300 fuel gauge sample configuration/build problem</title><link>https://devzone.nordicsemi.com/thread/547816?ContentTypeID=1</link><pubDate>Thu, 04 Sep 2025 21:19:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c593fa8-7fa8-4a5d-929f-2af2406c93ef</guid><dc:creator>sd30</dc:creator><description>&lt;p&gt;Update.&amp;nbsp; I was able to get battery SOC data using the asset tracker example which does support the Thingy-91X;&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://docs.nordicsemi.com/bundle/asset-tracker-template-latest/page/index.html"&gt;https://docs.nordicsemi.com/bundle/asset-tracker-template-latest/page/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This code builds for&amp;nbsp;thingy91x/nrf9151/ns and ideally we&amp;#39;d like to run on the nrf53 since that&amp;#39;s supporting BLE and the battery service.&lt;/p&gt;
&lt;p&gt;The SOC values seem OK in limited testing but I take Achim&amp;#39;s point that a battery model 91X would be needed.&lt;/p&gt;
&lt;p&gt;Regarding Mathiaso &amp;quot;&lt;span&gt;reconfiguration procedure that gives the nRF53 control of the I2C&amp;quot; - any more info on this?&amp;nbsp; Perhaps that is why the build above fails? - lack of reconfiguration of the i2c bus from &amp;#39;91 to &amp;#39;53?&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BTW I had already made the DEVICE_DT* changes to the fuel gauge sample to use the 91x names;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;npm1300_fuel_gauge/src/main.c;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;#ifdef&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;TEST_ON_91X_NRF53&lt;/span&gt;&lt;span&gt;&amp;nbsp;//&amp;nbsp;build fails&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;static const struct &lt;/span&gt;&lt;span&gt;device&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;pmic&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;DEVICE_DT_GET&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;(pmic_main));&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;device&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;charger&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;DEVICE_DT_GET&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;(npm1300_charger));&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#else&lt;/span&gt;&lt;span&gt; // works for&amp;nbsp;nrf5340dk_nrf5340_cpuapp&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; device &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;pmic &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;DEVICE_DT_GET&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;(npm1300_ek_pmic));&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; device &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;charger &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;DEVICE_DT_GET&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;(npm1300_ek_charger));&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#endif&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;and above you see if created&amp;nbsp;&lt;span&gt;thingy91x_nrf5340_cpuapp.overlay&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91X npm1300 fuel gauge sample configuration/build problem</title><link>https://devzone.nordicsemi.com/thread/547420?ContentTypeID=1</link><pubDate>Tue, 02 Sep 2025 08:57:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c80d2d16-b6d1-4dc3-a77f-f76095c4b63c</guid><dc:creator>mathiaso</dc:creator><description>&lt;p&gt;I&amp;#39;ve received some feedback now, Richard.&lt;/p&gt;
&lt;p&gt;Supposedly, it is difficult to do what you want, as we on the Thingy:91 X don&amp;#39;t show how to use the nRF53 as anything else than a connectivity bridge (other than a proof-of-concept config of wifi shell).&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been told that there should be two ways to go at this.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Either use the nRF53 as a BLE controller, with the host running on the nRF91.&lt;/li&gt;
&lt;li&gt;Or do the reconfiguration procedure that gives the nRF53 control of the I2C and SPI buses. There are device tree overlays in the board files for this. Also, additional partition tables, since external flash belongs to the chip who owns the SPI.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of this is highly experimental and not documented, I&amp;#39;m afraid.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91X npm1300 fuel gauge sample configuration/build problem</title><link>https://devzone.nordicsemi.com/thread/547113?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2025 18:46:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65734e52-9982-4f92-9995-0b44a5c956e1</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;Some hints, though I considered the same, but withdrawn it:&lt;/p&gt;
&lt;p&gt;AFAIK, there is no battery model for the 1350mAh battery used in the Thingy:91X, only other/smaller batteries are available. Without that model, the result may be not that good, if useful at all.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It may be easier to copy the &amp;quot;battery_model.inc&amp;quot;, &amp;quot;fuel_gauge.c&amp;quot; and &amp;quot;fuel_gauge.h&amp;quot; to a Thingy:91X project and add that there to the &amp;quot;CMakeLists.txt&amp;quot;.&lt;/p&gt;
&lt;p&gt;The code in &amp;quot;main.c&amp;quot; must the be also added to that&amp;nbsp;Thingy:91X project. The npm1300 devices must then be&lt;/p&gt;
&lt;p&gt;static const struct device *pmic = DEVICE_DT_GET(DT_NODELABEL(pmic_main));&lt;br /&gt;static const struct device *charger = DEVICE_DT_GET(DT_NODELABEL(npm1300_charger));&lt;/p&gt;
&lt;p&gt;instead of &amp;quot;npm1300_ek_pmic&amp;quot; and &amp;quot;npm1300_ek_charger&amp;quot; or, alternative you will need to add those label in an overlay, e.g. &amp;quot;thingy91x_nrf9151_ns.overlay&amp;quot;&lt;/p&gt;
&lt;p&gt;npm1300_ek_pmic: &amp;amp;pmic_main {&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;npm1300_ek_charger: &amp;amp;npm1300_charger {&lt;br /&gt;&lt;br /&gt;};&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91X npm1300 fuel gauge sample configuration/build problem</title><link>https://devzone.nordicsemi.com/thread/547096?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2025 13:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba69216a-afc6-4131-97a2-b4cadaa8a428</guid><dc:creator>sd30</dc:creator><description>&lt;p&gt;Thanks Mathias,&lt;/p&gt;
&lt;p&gt;In the meantime are there any links or suggestions how to resolve the build errors?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91X npm1300 fuel gauge sample configuration/build problem</title><link>https://devzone.nordicsemi.com/thread/547095?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2025 13:26:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f037975-94b2-4220-824a-3aa96d4d4517</guid><dc:creator>mathiaso</dc:creator><description>&lt;p&gt;Ok. I&amp;#39;m currently not aware of such a sample, but I&amp;#39;ve asked the Thingy:91 X team if there is one, or if not, if there are any other samples that may be good starting points for achieving this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91X npm1300 fuel gauge sample configuration/build problem</title><link>https://devzone.nordicsemi.com/thread/546961?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2025 15:02:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f2d828f-d300-4865-b0f8-5e24efca1951</guid><dc:creator>sd30</dc:creator><description>&lt;p&gt;Hi Mathias,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Looking to get battery SOC from the pmic for a BLE BAS service on Thingy-91x.&amp;nbsp; That would be a useful sample for most users of this very nice board.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91X npm1300 fuel gauge sample configuration/build problem</title><link>https://devzone.nordicsemi.com/thread/546936?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2025 13:29:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96bd7e5f-0ffa-40d8-a326-8e44b7683d3a</guid><dc:creator>mathiaso</dc:creator><description>&lt;p&gt;Hi, Richard.&lt;/p&gt;
&lt;p&gt;Is it &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/pmic/native/npm13xx_fuel_gauge/README.html"&gt;fuel gauging&lt;/a&gt; you want to do? If so, you should use the&amp;nbsp;use the &lt;a href="https://docs.nordicsemi.com/bundle/ug_npm1300_ek/page/UG/nPM1300_EK/intro.html"&gt;nPM1300 EK&lt;/a&gt; with the &lt;a href="https://docs.nordicsemi.com/bundle/ug_npm_fuel_gauge/page/UG/nPM_fuel_gauge/intro.html"&gt;nPM Fuel Gauge Board&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Mathias&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>