<?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>TWI reads false values</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100987/twi-reads-false-values</link><description>Hello! 
 I have been trying to read a flow sensor with the nRF52840 DK, but the output is unexpected. 
 It has been proven that the flow sensor is functional, by connecting it with another MCU. Moreover, a logic analyzer has been deployed to read the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Aug 2023 10:46:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100987/twi-reads-false-values" /><item><title>RE: TWI reads false values</title><link>https://devzone.nordicsemi.com/thread/440282?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2023 10:46:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d3d76e9-ef83-4784-b1d6-59b4ae854d0a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again, Kostas&lt;br /&gt;&lt;br /&gt;Apologies for the extremely long response time here - I have been out of office for the last month, and it seems that this case for one reason or another has not been re-assigned to another engineer in my absence.&lt;br /&gt;&lt;br /&gt;Do you still require techinical support with this issue, or has it been resolved in the time passed?&lt;br /&gt;If not, what is the most recent updates?&lt;br /&gt;&lt;br /&gt;I once again apologies for the lack of attention from us in the time that has passed since my last reply to you.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI reads false values</title><link>https://devzone.nordicsemi.com/thread/434680?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 11:40:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:304f976e-c015-4500-98d3-68ab43e71b72</guid><dc:creator>kostathan97</dc:creator><description>&lt;p&gt;I am also attaching the output of the terminal.&lt;/p&gt;
&lt;p&gt;The problem is that I am seeing the 7F-FF values from the two registers, which translates to the maximum scale of the sensor. I should not be seeing this in the output!&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/pastedimage1688557129901v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI reads false values</title><link>https://devzone.nordicsemi.com/thread/434589?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 06:35:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:957203da-5de4-43f0-ac3a-678e87680637</guid><dc:creator>kostathan97</dc:creator><description>&lt;p&gt;Hello Karl!&lt;/p&gt;
&lt;p&gt;So, over the past days, I was trying to evaluate what you told me.&lt;/p&gt;
&lt;p&gt;When I used the logic analyzer, the output I received was completely normal, meaning that the flow sensor is actually sending some values, and the DK receives them correctly. The thing is that these values are incorrect. So, the flow sensor gives off incorrect values, but there is no problem with the DK.&lt;/p&gt;
&lt;p&gt;After that, I tried to find what was wrong, and for the life of me, I could not see anything wrong with my code. As a result, I&amp;nbsp;started all over from the TWI sensor example. Nothing changed. Even at the most basic level of TWI code, the registers I am reading are giving me the wrong info. What is curious is that when I use the same sensor with a BBB board, where I do not know the code that is being executed, the flow sensor gives correct values. So it is not a sensor problem.&lt;/p&gt;
&lt;p&gt;I am attaching you the twi code and the sensor&amp;#39;s datasheet, where I have highlighted some lines on page 6, so you can understand a bit about the register I am trying to read. Chapter 2.4 is also quite useful. The sensor, by default, jumps into reading the flow register, and so I do not change the register read in my code. In the code, I am just shooting the sensor&amp;#39;s registers values in the Terminal, every time a twi event occurs. I do not try to translate the data into real values, since I see that the raw register values are incorrect.&lt;/p&gt;
&lt;p&gt;Do you have any idea what I am doing wrong?&lt;/p&gt;
&lt;p&gt;I am truly pissed, because I know that it is a very simple application, but I cannot get it to work.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you in advance,&lt;/p&gt;
&lt;p&gt;Kostas&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ESF-Series-I2C-Interface_5F00_v2.pdf"&gt;devzone.nordicsemi.com/.../ESF-Series-I2C-Interface_5F00_v2.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/twi_5F00_sensor_5F00_mine.zip"&gt;devzone.nordicsemi.com/.../twi_5F00_sensor_5F00_mine.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI reads false values</title><link>https://devzone.nordicsemi.com/thread/432280?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 11:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e504c408-1a0b-44c0-bb60-84e674d60baf</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="kostathan97"]Thank you for the prompt response Karl.[/quote]
&lt;p&gt;No problem at all, Kostas - I am happy to help! :)&amp;nbsp;&lt;/p&gt;
[quote user="kostathan97"]I will get back to you shortly with the things you asked.[/quote]
&lt;p&gt;Great - let&amp;#39;s continue this when you&amp;#39;ve had time to gather the data.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI reads false values</title><link>https://devzone.nordicsemi.com/thread/432273?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 11:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bf8dac8-6126-444f-8152-a5cd181f0ead</guid><dc:creator>kostathan97</dc:creator><description>&lt;p&gt;Thank you for the prompt response Karl.&lt;/p&gt;
&lt;p&gt;I will get back to you shortly with the things you asked.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Kostas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI reads false values</title><link>https://devzone.nordicsemi.com/thread/432271?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 11:01:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae5df4c8-e458-432e-9c09-4299f832fc75</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again, Kostas&lt;br /&gt;&lt;br /&gt;Thank you for the clarification - I was previously under the impression that the communication had been verified to work, while the received values did not match the expectations.&lt;br /&gt;Could you give some examples of this, so that I can see whether there are anything standing out in the behavior?&lt;br /&gt;For instance, could you show me the logger from the nRF side, along with the code that you are using to read the TWI, together with a logic analyzer trace that shows what was written on the bus?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI reads false values</title><link>https://devzone.nordicsemi.com/thread/432248?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 09:48:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7176744-babf-4c1a-af44-b63d23d3f606</guid><dc:creator>kostathan97</dc:creator><description>&lt;p&gt;Hello Karl,&lt;/p&gt;
&lt;p&gt;The logic analyzer portrays the correct values, but the nRF receives them wrongly.&lt;/p&gt;
&lt;p&gt;Moreover, on the datasheet of the manufacturer, there are no configuration steps. You just plug and play with the flow sensor.&lt;/p&gt;
&lt;p&gt;Do you have any ideas on what could be causing that?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Kostas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI reads false values</title><link>https://devzone.nordicsemi.com/thread/431961?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 11:15:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad9a22c4-a75e-47b0-b816-148bd1de1ea7</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Kostas,&lt;br /&gt;&lt;br /&gt;It sounds to me like your communication with the sensor is correct, but that the values are not as expected - have I understood this correctly?&lt;br /&gt;When you use the logic analyzer, is the data exactly what you receive on the nRF?&lt;br /&gt;If so, it could be that you have not configured the sensor before using it - could this have been done differently on the other SoC&amp;#39;s you tested this with?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>