<?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>Arduino TWI to NRF52 TWI conversion</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43624/arduino-twi-to-nrf52-twi-conversion</link><description>I am still trying to convert properly the Arduino MAX30105 driver to work with NRF52 and managed to come to somewhere... Everything works except the reading of the MAX30105 FIFO data (the data from the sensor). I have troubles understanding how to do</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Feb 2019 06:30:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43624/arduino-twi-to-nrf52-twi-conversion" /><item><title>RE: Arduino TWI to NRF52 TWI conversion</title><link>https://devzone.nordicsemi.com/thread/171539?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 06:30:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce866046-ac3c-4969-915f-d7b4384a79a2</guid><dc:creator>alexSvarc</dc:creator><description>&lt;p&gt;you were totally correct even in your first reply but i was unable to understand you because of my limited knowledge...&lt;/p&gt;
&lt;p&gt;after reading the sensor datasheet and the twi sdk documentation for more than 100 times after your reply i finally got it what i need to do... the deal was as you said i should have read all 9 bytes at once and then store the result 3 bytes at a time into the value holders of the 3 separate measurement values...&lt;/p&gt;
&lt;p&gt;thanks allot for you help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino TWI to NRF52 TWI conversion</title><link>https://devzone.nordicsemi.com/thread/170739?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 03:26:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:877fe201-668b-4469-b5d5-d63e00f5707b</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;if you want to read 9 bytes, then you need to read it in 1 shot. &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino TWI to NRF52 TWI conversion</title><link>https://devzone.nordicsemi.com/thread/170730?ContentTypeID=1</link><pubDate>Tue, 12 Feb 2019 22:00:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8354c8f4-d27c-4788-bdc1-fc79c070fe8c</guid><dc:creator>alexSvarc</dc:creator><description>&lt;p&gt;Thanks for your replay. &lt;br /&gt;That worked somewhat.&lt;/p&gt;
&lt;p&gt;Using a red paper over the sensor this is what i get from nrf52 board:&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: Red: 69110&amp;nbsp;&amp;nbsp; IR: 69101&amp;nbsp;&amp;nbsp; Green: 69087&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69090&amp;nbsp;&amp;nbsp; IR: 69095&amp;nbsp;&amp;nbsp; Green: 69076&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69036&amp;nbsp;&amp;nbsp; IR: 69061&amp;nbsp;&amp;nbsp; Green: 69068&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69052&amp;nbsp;&amp;nbsp; IR: 69052&amp;nbsp;&amp;nbsp; Green: 69066&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69039&amp;nbsp;&amp;nbsp; IR: 69047&amp;nbsp;&amp;nbsp; Green: 69048&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69003&amp;nbsp;&amp;nbsp; IR: 69022&amp;nbsp;&amp;nbsp; Green: 69031&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69055&amp;nbsp;&amp;nbsp; IR: 69040&amp;nbsp;&amp;nbsp; Green: 69018&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69035&amp;nbsp;&amp;nbsp; IR: 69037&amp;nbsp;&amp;nbsp; Green: 69037&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69056&amp;nbsp;&amp;nbsp; IR: 69077&amp;nbsp;&amp;nbsp; Green: 69023&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69081&amp;nbsp;&amp;nbsp; IR: 68991&amp;nbsp;&amp;nbsp; Green: 69016&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69049&amp;nbsp;&amp;nbsp; IR: 69022&amp;nbsp;&amp;nbsp; Green: 69011&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 69019&amp;nbsp;&amp;nbsp; IR: 68981&amp;nbsp;&amp;nbsp; Green: 68992&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 68934&amp;nbsp;&amp;nbsp; IR: 68948&amp;nbsp;&amp;nbsp; Green: 68968&lt;br /&gt;&amp;lt;info&amp;gt; app: Red: 68951&amp;nbsp;&amp;nbsp; IR: 68946&amp;nbsp;&amp;nbsp; Green: 68980&lt;br /&gt;&lt;br /&gt;This is using the same red paper over the sensor from Arduino:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;R[72284] IR[82808] G[1303]&lt;br /&gt;&amp;nbsp;R[72278] IR[82796] G[1305]&lt;br /&gt;&amp;nbsp;R[72280] IR[82803] G[1309]&lt;br /&gt;&amp;nbsp;R[72287] IR[82812] G[1306]&lt;br /&gt;&amp;nbsp;R[72282] IR[82819] G[1317]&lt;br /&gt;&amp;nbsp;R[72270] IR[82819] G[1311]&lt;br /&gt;&amp;nbsp;R[72276] IR[82813] G[1315]&lt;br /&gt;&amp;nbsp;R[72283] IR[82823] G[1309]&lt;br /&gt;&amp;nbsp;R[72286] IR[82825] G[1303]&lt;br /&gt;&amp;nbsp;R[72287] IR[82821] G[1309]&lt;br /&gt;&amp;nbsp;R[72289] IR[82828] G[1306]&lt;br /&gt;&amp;nbsp;R[72291] IR[82815] G[1308]&lt;br /&gt;&amp;nbsp;R[72280] IR[82805] G[1306]&lt;br /&gt;&amp;nbsp;R[72299] IR[82818] G[1305]&lt;br /&gt;&amp;nbsp;R[72298] IR[82818] G[1315]&lt;br /&gt;&amp;nbsp;R[72289] IR[82819] G[1306]&lt;br /&gt;&amp;nbsp;R[72308] IR[82826] G[1307]&lt;br /&gt;&amp;nbsp;R[72310] IR[82809] G[1303]&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Arduino TWI to NRF52 TWI conversion</title><link>https://devzone.nordicsemi.com/thread/170718?ContentTypeID=1</link><pubDate>Tue, 12 Feb 2019 17:39:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73e7d754-839e-4221-83e9-7e53add634be</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;I guess what you wanted to do is :&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint8_t m_sample[sizeof(toGet)];      
      while (toGet &amp;gt; 0)
      {
        sense.head++; //Advance the head of the storage struct
        sense.head %= MAX30105_STORAGE_SIZE; //Wrap condition

        uint8_t temp[sizeof(uint32_t)]; //Array of 4 uint8_ts that we will convert into long
        uint32_t tempLong;

        //Burst read three uint8_ts - RED
        err_code1 = nrf_drv_twi_rx(&amp;amp;m_twi, MAX30105_ADDRESS, temp, 3);                
        APP_ERROR_CHECK(err_code1);
        templong = ((uint32_t)temp[0] &amp;lt;&amp;lt; 16) | ((uint32_t)temp[1]&amp;lt;&amp;lt;8) | temp[2];
        
      }
 &lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>