<?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 manager read too many bytes?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64127/twi-manager-read-too-many-bytes</link><description>Hi despite trying 3 different approaches (even using the Nordic driver lis2dh12 on a blinky-based project and installing Segger Studio to step/debug into the library code) I keep stumbling over the same problem. I try to read 1 byte from LIS2DH sensor</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Jul 2020 14:54:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64127/twi-manager-read-too-many-bytes" /><item><title>RE: TWI manager read too many bytes?</title><link>https://devzone.nordicsemi.com/thread/261636?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2020 14:54:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67a78c16-d52f-4247-9257-e1f13a4bb013</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Haha. I&amp;#39;m glad I could help :) Have a nice weekend too&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI manager read too many bytes?</title><link>https://devzone.nordicsemi.com/thread/261631?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2020 14:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5053720f-893e-4018-a4be-67cb70adc605</guid><dc:creator>peterz</dc:creator><description>&lt;p&gt;GOT ME - one more time, I&amp;#39;m so stupid (the hardest bugs are the ones in my head)&lt;br /&gt;thanks a lot - have a nice weekend&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI manager read too many bytes?</title><link>https://devzone.nordicsemi.com/thread/261623?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2020 14:02:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57f475f1-354e-4dee-8b8c-d696c04996c6</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;It looks normal. The first 0x33 is not the data returned by the sensor, it is the addr + read bit.&lt;/p&gt;
&lt;p&gt;Please have a look at table 17 in the LIS2DH data sheet.&lt;/p&gt;
&lt;p&gt;This is what is happening in your oscilloscope plot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start condition&lt;/li&gt;
&lt;li&gt;Addr + Write bit (0x32)&lt;/li&gt;
&lt;li&gt;Register address&lt;/li&gt;
&lt;li&gt;Repeated start&lt;/li&gt;
&lt;li&gt;Addr + Read bit (0x33)&lt;/li&gt;
&lt;li&gt;Received data (0x33)&lt;/li&gt;
&lt;li&gt;NACK(end of data)&lt;/li&gt;
&lt;li&gt;Stop condition&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI manager read too many bytes?</title><link>https://devzone.nordicsemi.com/thread/261558?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2020 10:27:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b07459b0-be89-428b-bb2f-58c61148131c</guid><dc:creator>peterz</dc:creator><description>&lt;p&gt;sorry, I forgot to say: I use 52840 on a custom board.&lt;/p&gt;
&lt;p&gt;And in the meantime I tried&lt;br /&gt;#define TWI0_USE_EASY_DMA 1&lt;br /&gt;but that did not help either&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>