<?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>Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73495/reading-battery-information-through-adp536x-pmic-in-thingy91</link><description>Hi Dev team, 
 I have been working on a Thingy91and I was trying to read out the battery voltage of the device. 
 I was able to do that through the modem using the MODEM_INFO library. 
 However, I would like to know how could I get the battery information</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Apr 2021 10:31:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73495/reading-battery-information-through-adp536x-pmic-in-thingy91" /><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/304471?ContentTypeID=1</link><pubDate>Tue, 13 Apr 2021 10:31:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89b4e079-29b9-48da-bc29-77d05c79b7c7</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;My apologies. It&amp;#39;s attached correctly now!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/304449?ContentTypeID=1</link><pubDate>Tue, 13 Apr 2021 09:33:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25d32d15-48d7-42c1-8747-01bc69ce3f9a</guid><dc:creator>Adeel</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;Thanks, but I could not find the attachment of the asset tracker old version. Could you send it once again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Adeel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/304447?ContentTypeID=1</link><pubDate>Tue, 13 Apr 2021 09:26:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bf38767-9514-455a-a0c1-0697c2df7b32</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve attached a old version of the asset_tracker, using the battery monitor. You can have a look at that, but it should be enough to initialize and read. You could try to experiment with the parameters defined in battery_monitor.c and see if they give you better results? I see that the default configuration only samples charge every 16 minutes when charging.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/asset_5F00_tracker_5F00_old_5F00_with_5F00_battery_5F00_monitor.zip"&gt;devzone.nordicsemi.com/.../asset_5F00_tracker_5F00_old_5F00_with_5F00_battery_5F00_monitor.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/304426?ContentTypeID=1</link><pubDate>Tue, 13 Apr 2021 08:10:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd3d36d8-d7ef-4399-88ad-a3c2bbcbb09c</guid><dc:creator>Adeel</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
[quote userid="68044" url="~/f/nordic-q-a/73495/reading-battery-information-through-adp536x-pmic-in-thingy91/304419#304419"]Did you call&amp;nbsp;&lt;strong&gt;battery_monitor_init&lt;/strong&gt; first?[/quote]
&lt;p&gt;Yes I called the battery_monitor_init() at the start and then tried calling the battery_monitor_read() function.&lt;/p&gt;
&lt;p&gt;The compiler did not issue any warnings for the&amp;nbsp;&lt;span&gt;battery_monitor_init() function. It built fine.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I just wanted to see in which way the battery_monitor_read() function is called in the main function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Adeel.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/304419?ContentTypeID=1</link><pubDate>Tue, 13 Apr 2021 07:43:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e7d45f3-ed12-4a66-9168-a07504e5b0fa</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi, Adeel!&lt;br /&gt;&lt;br /&gt;Did you call&amp;nbsp;&lt;strong&gt;battery_monitor_init&lt;/strong&gt; first?&amp;nbsp;And did the compiler throw any build warnings/errors? I&amp;#39;ll check if we have some more sample code!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/304350?ContentTypeID=1</link><pubDate>Mon, 12 Apr 2021 16:01:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9936a59d-bc2e-4af6-b87d-935814746378</guid><dc:creator>Adeel</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;I tried using your code and I added the extra functions of the adp536x that were present in your files to the existing library.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I copied the battery_monitor.c code into my code and tried to call the : battery_monitor_read(uint8_t *buf) function in my main but I got a value of 0.&lt;/p&gt;
&lt;p&gt;I think I am calling it in a wrong way. Could you let me know what is the right way to call this function in the main() part of my code (or) could you point me out as to how it was used before in the old asset tracker examples.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Adeel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/303830?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 15:01:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e97133b-43bb-4638-a738-e8570945279e</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;My pleasure! Good luck.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/303825?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 14:36:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7df84b65-55af-467f-a08a-e2e7c1a08e65</guid><dc:creator>Adeel</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;Thanks for the clarification on this &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;. I will try it out and let you know.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Adeel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/303820?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 14:19:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32aa84e8-0837-48c0-8327-d70a433c3692</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again, Adeel!&lt;br /&gt;&lt;br /&gt;You are correct. This is code that was meant to be used with the asset_tracker, but it was ultimately left out. Hence, there is no guarantee that it works, but most of it should!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/303809?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 13:51:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8b34fb4-c41d-4b00-893b-0bc784b4a452</guid><dc:creator>Adeel</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;Thanks for the files. I noticed that the driver and header file that you gave me (of adp536) has some extra functions that are not present in the current adp536 files in the latest version.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will try to use the module out and let you know but I&amp;nbsp;was curious to know if there is any specific reason that the library files are different from what it is in NCS v1.5.0 and what you sent me.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Adeel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/303488?ContentTypeID=1</link><pubDate>Wed, 07 Apr 2021 12:09:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cab9cf44-427b-4d05-8ab6-7dc76ccee211</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;Some work on this actually have been done in the past. I have attached a driver and header file with the required changes implemented, and a module using the driver. Note that this isn&amp;#39;t tested with the newest version of NCS/Zephyr, so some changes (especially in the module) are likely required. Notify me if you face any issues!&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5633.adp536x_5F00_with_5F00_battery_5F00_monitor.zip"&gt;devzone.nordicsemi.com/.../5633.adp536x_5F00_with_5F00_battery_5F00_monitor.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/303445?ContentTypeID=1</link><pubDate>Wed, 07 Apr 2021 11:01:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e39bc7ae-af5c-482c-84d0-a5cf43374002</guid><dc:creator>Adeel</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;Thanks for the lead. I will try this and let you know &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Could you please let me know if you get any word from the developers ?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Adeel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading battery information through adp536x PMIC in Thingy91</title><link>https://devzone.nordicsemi.com/thread/303398?ContentTypeID=1</link><pubDate>Wed, 07 Apr 2021 08:51:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b86d7b2-12b4-4755-b193-e36f11dd3185</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi, Adeel!&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve asked the developers about this, but from&amp;nbsp;what I can see it&amp;#39;s not implemented. From reading the &lt;a href="https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5360.pdf"&gt;ADP5360 datasheet&lt;/a&gt;&amp;nbsp;it seems like it shouldn&amp;#39;t be too much of a challenge to add support for reading the&amp;nbsp;VBAT_READ register. I suggest looking into the source code (adp536x.c) and using the already implemented adp536x_reg_read(...) function.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>