<?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>bq4050 reading fail on smbus</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80881/bq4050-reading-fail-on-smbus</link><description>Hello, 
 I tried to read the value from bq4050 on smbus. 
 I had good results but I got wrong value randomly as following. 
 The last marked value is temperature from DAStatus2Reg(0x72). it works well but randomly it works malfunction. 
 How can I solve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Oct 2021 11:29:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80881/bq4050-reading-fail-on-smbus" /><item><title>RE: bq4050 reading fail on smbus</title><link>https://devzone.nordicsemi.com/thread/335277?ContentTypeID=1</link><pubDate>Thu, 21 Oct 2021 11:29:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebc3beba-cad4-41d7-bb48-db0f8aa8aac5</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Can you try to&amp;nbsp;initialize&amp;nbsp;the various variables (e.g. addresses and arrays) with the &amp;#39;static&amp;#39; keyword?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the problem still exists I suggest that you add a logic analyzer to measure the twi interface, and set a breakpoint when you experience the wrong value so you may stop the trace and see if you can find anything wrong with the serial data or internal variables (e.g. is the sensor writing the wrong data or not).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>