<?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>Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65978/interfacing-a-sensor-hub-with-twi-drivers</link><description>Hi, 
 I am trying to adapt the read register function that use the TwoWire lib of Arduino in order to read a Sensor Hub Response Byte of a defined Host Command : 
 
 
 to have a function that uses the nrf_dr_twi, like this: 
 
 
 
 Have you some ideas</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Oct 2020 11:55:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65978/interfacing-a-sensor-hub-with-twi-drivers" /><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/273721?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2020 11:55:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:659ea2fb-4fab-4be5-8383-dd39f33904b1</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Polimarte,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="polimarte "]Thanks for helping me again![/quote]
&lt;p&gt;It is no problem at all, Polimarte! I am happy to help, and glad to see that you appreciate and implement the advice and suggestions you get in the forum - it is great!&lt;/p&gt;
[quote user="polimarte "]Can be a good solution for the read function? the write one it ll be very similar following this logic.[/quote]
&lt;p&gt;The logic / approach seems all right in this function, you might have to add a delay / wait in between the two xfer calls, as shown in your illustration. It will be easier to debug once you are able to compile and flash you program, and monitor how it behaves.&lt;/p&gt;
[quote user="polimarte "]Unfortunately i am stack with other ( many) errors in a previous part of my code and i cannot verify the correctness of these functions, but i ll do that very soon and i ll let you know if there are some problems![/quote]
&lt;p&gt;I am sorry to hear that you are experiencing some other issues, and I look forward to hearing if this works as intended when you have cleared out the other errors.&lt;br /&gt;&lt;br /&gt;Good luck with your debugging and development!&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: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/273524?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 14:00:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06236a2b-315d-4f0e-ac26-d9417f424878</guid><dc:creator>polimarte </dc:creator><description>&lt;p&gt;Hi my dear Karl!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for helping me again!&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/65978/interfacing-a-sensor-hub-with-twi-drivers/273497#273497"]However, I&amp;nbsp;am not sure that this will behave as expected, since when you are using the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__nrfx__twim.html&amp;amp;anchor=gae53a1bebcd5961e1cd7a79e4039b8c88"&gt;TXRX transfer description there is no STOP condition generated in between the TX and RX &lt;/a&gt;- this is not as shown in the&amp;nbsp;illustration&amp;nbsp;you posted earlier. [/quote]
&lt;p&gt;I used the TX and RX transfers separately in this way:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
uint8_t readByte_WB(uint8_t familyByte, uint8_t indexByte, uint8_t writeByte)
{

		nrfx_err_t err_code;
		uint8_t StatusByte;    
        uint8_t ReturnByte;
   
        uint8_t rx_buffer[2];
		size_t rx_lenght =2;

		uint8_t tx_buffer[] = {familyByte, indexByte, writeByte};    
		size_t tx_lenght = sizeof(familyByte) + sizeof(indexByte) + sizeof(writeByte);

		nrfx_twim_xfer_desc_t tx_xfer = NRFX_TWIM_XFER_DESC_TX(address, tx_buffer, tx_lenght);
		err_code = nrfx_twim_xfer(&amp;amp;twim_instance, &amp;amp;tx_xfer, 0);
		APP_ERROR_CHECK(err_code);
		
		nrfx_twim_xfer_desc_t rx_xfer = NRFX_TWIM_XFER_DESC_RX(address, rx_buffer, rx_lenght);
		err_code = nrfx_twim_xfer(&amp;amp;twim_instance, &amp;amp;rx_xfer, 0);
		APP_ERROR_CHECK(err_code);
    
		StatusByte = rx_buffer[0];
        NRF_LOG_INFO(&amp;quot;Status Byte: %lu \n&amp;quot;,StatusByte); //0x00 for SUCCESS
    
		ReturnByte = rx_buffer[1];  
		return ReturnByte;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Can be a good solution for the read function? the write one it ll be very similar following this logic.&lt;/p&gt;
&lt;p&gt;Unfortunately i am stack with other ( many) errors in a previous part of my code and i cannot verify the correctness of these functions, but i ll do that very soon and i ll let you know if there are some problems!&lt;/p&gt;
&lt;p&gt;I just want to know if the logic behind this is correct, than i ll debug this part of the code properly.&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/65978/interfacing-a-sensor-hub-with-twi-drivers/273497#273497"] if you have a static array length that your twim transactions always will return, then it is preferable that you create a define for this, for increased readability.[/quote]
&lt;p&gt;I will do that, thanks for the advice!&lt;/p&gt;
&lt;p&gt;thanks,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;polimarte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/273497?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 12:46:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:371488d5-1194-415c-81cb-b3abb80b3093</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Polimarte,&lt;br /&gt;&lt;br /&gt;Sorry for my late reply, I was out of office for some days.&lt;/p&gt;
[quote user="polimarte "]Thanks to the excellent Nordic costumer service I am sure i ll made it.[/quote]
&lt;p&gt;I am happy to hear you say that, thank you!&lt;/p&gt;
[quote user="polimarte "]I followed your hints and i modified my code, hope to present a better solution now. What i wanted to do is to modify the read and write function for Arduino, that use the library Wire.h to implement the transactions TXRX. The read function of the&amp;nbsp;Arduino code is in my original question. The write function is implemented in this way:[/quote]
&lt;p&gt;I am glad to see the changes you have made to your functions, they are huge improvements!&lt;br /&gt;&lt;br /&gt;I will include some comments below:&lt;/p&gt;
&lt;p&gt;You are absolutely on the right track here, this looks a lot better!&lt;/p&gt;
[quote user="polimarte "]I understand that formally it would be more correct use pointers in order to retrieve the bytes with buffers but i need a non void return function for my adaptation to the original code.[/quote]
&lt;p&gt;I understand, and I see that you function still returns the&amp;nbsp;&lt;em&gt;StatusByte&amp;nbsp;&lt;/em&gt;instead of the err_code. I assume this is done for compatibility with other ported functions from the Arduino Library. &lt;br /&gt;However, I would suggest that you include an APP_ERROR_CHECK on the err_code returned from nrfx_twim_xfer, to catch any errors being generated.&lt;br /&gt;&lt;br /&gt;I also notice your use of&amp;nbsp;&lt;em&gt;magic numbers&amp;nbsp;&lt;/em&gt;for the size/length of&amp;nbsp;&lt;em&gt;rx_buffer&lt;/em&gt; - I would advise against doing this for any piece of code. Preferably, if you have a static array length that your twim transactions always will return, then it is preferable that you create a define for this, for increased readability.&lt;br /&gt;&lt;br /&gt;Other than that, this use of the nrfx_twim driver seems fine!&lt;br /&gt;&lt;br /&gt;However, I&amp;nbsp;am not sure that this will behave as expected, since when you are using the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__nrfx__twim.html&amp;amp;anchor=gae53a1bebcd5961e1cd7a79e4039b8c88"&gt;TXRX transfer description there is no STOP condition generated in between the TX and RX &lt;/a&gt;- this is not as shown in the&amp;nbsp;illustration&amp;nbsp;you posted earlier. From the illustration, it seems very much like you will need a stop condition before doing the next operation.&lt;br /&gt;So, you might have to do this in separate transfers after all ( first completing a TX of length three, then completing a RX of length two )&amp;nbsp; - Sorry that I did not catch this when I recommended you the TXRX description, my mistake.&lt;/p&gt;
[quote user="polimarte "]It is the right way for the implementation or i am missing something?[/quote]
&lt;p&gt;Your usage of the nrfx_twim driver seems to be implemented correctly now.&lt;br /&gt;What are you seeing when you run this code - are you getting any errors, or unexpected behavior?&lt;/p&gt;
[quote user="polimarte "]I made other similar functions (following the method of the Arduino Code) in case of the need to retrieve different byte lengths (uint16_t,uint32_t..) or to fill arrays passed as input.[/quote]
&lt;p&gt;Make sure to give these functions clear and descriptive names, to differentiate them from each other.&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: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/272230?ContentTypeID=1</link><pubDate>Wed, 30 Sep 2020 10:09:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fff68e9-87a4-4c3b-b62c-923eedcbb6d2</guid><dc:creator>polimarte </dc:creator><description>&lt;p&gt;Hi Karl!&lt;/p&gt;
&lt;p&gt;I followed your hints and i modified my code, hope to present a better solution now. What i wanted to do is to modify the read and write function for Arduino, that use the library Wire.h to implement the transactions TXRX. The read function of the&amp;nbsp;Arduino code is in my original question. The write function is implemented in this way:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint8_t SparkFun_Bio_Sensor_Hub::writeByte(uint8_t _familyByte,uint8_t _indexByte,uint8_t _writeByte)
{

  _i2cPort-&amp;gt;beginTransmission(_address);     
  _i2cPort-&amp;gt;write(_familyByte);    
  _i2cPort-&amp;gt;write(_indexByte);    
  _i2cPort-&amp;gt;write(_writeByte); 
  _i2cPort-&amp;gt;endTransmission(); 
  delay(CMD_DELAY); 

  // Status Byte, success or no? 0x00 is a successful transmit
  _i2cPort-&amp;gt;requestFrom(_address, static_cast&amp;lt;uint8_t&amp;gt;(1)); 
  uint8_t statusByte = _i2cPort-&amp;gt;read(); 
  return statusByte; 

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and i have used the NRFX_TWIM_XFER_DESC_TXRX in this way for Read:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint8_t readByte_WB(uint8_t familyByte, uint8_t indexByte, uint8_t writeByte)
{

		nrfx_err_t err_code
		uint8_t StatusByte;    
        uint8_t ReturnByte;
   
        uint8_t rx_buffer[2];
		size_t rx_lenght =2;

		uint8_t tx_buffer[] = {familyByte, indexByte, writeByte};    
		size_t tx_lenght = sizeof(familyByte) + sizeof(indexByte) + sizeof(writeByte);

		nrfx_twim_xfer_desc_t transferType = NRFX_TWIM_XFER_DESC_TXRX(address, tx_buffer, tx_lenght, rx_buffer,rx_lenght);
		err_code = nrfx_twim_xfer(&amp;amp;twim_instance, &amp;amp;transferType, 0);
		NRF_LOG_INFO(&amp;quot;Xfer error code: %s \n&amp;quot;, errorcode_printer(err_code));

    
		StatusByte = int(rx_buffer[0]);
        NRF_LOG_INFO(&amp;quot;Status Byte: %lu \n&amp;quot;,StatusByte); //0x00 for SUCCESS
    
		ReturnByte = rx_buffer[1];  
		return ReturnByte;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and for write:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint8_t writeByte( uint8_t familyByte, uint8_t indexByte, uint8_t writeByte)
{

		nrfx_err_t err_code
		
		uint8_t StatusByte;    
    
		uint8_t rx_buffer[1];
		size_t rx_lenght =1;

		uint8_t tx_buffer[] = {familyByte, indexByte, writeByte};    
		size_t tx_lenght = sizeof(familyByte) + sizeof(indexByte) + sizeof(writeByte);

		nrfx_twim_xfer_desc_t transferType = NRFX_TWIM_XFER_DESC_TXRX(address, tx_buffer, tx_lenght, rx_buffer,rx_lenght);
		err_code = nrfx_twim_xfer(&amp;amp;twim_instance, &amp;amp;transferType, 0);
		NRF_LOG_INFO(&amp;quot;Xfer error code: %s \n&amp;quot;, errorcode_printer(err_code));

		StatusByte = rx_buffer[0];
        
        return StatusByte;

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I understand that formally it would be more correct use pointers in order to retrieve the bytes with buffers but i need a non void return function for my adaptation to the original code. I use the StatusByte only to check the SUCCESS the TXRX and eventually i return the unsigned integer whose Byte length is predetermined (the bytes that follow the StatusByte). This Write function only write Family, Index and Write Byte, checking the StatusByte. The Read function in this case is used only to retrieve the first byte after the StatusByte which value luckly will be 0x00 (SUCCESS Transmission). I made other similar functions (following the method of the Arduino Code) in case of the need to retrieve different byte lengths (uint16_t,uint32_t..) or to fill arrays passed as input.&lt;/p&gt;
&lt;p&gt;It is the right way for the implementation or i am missing something?&lt;/p&gt;
&lt;p&gt;Thanks to help me again!&lt;/p&gt;
&lt;p&gt;polimarte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/272026?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 11:01:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a93058e-c9ae-41c1-a9b4-61138a3d8f0a</guid><dc:creator>polimarte </dc:creator><description>&lt;p&gt;Hi awneil thanks for the hint!&lt;/p&gt;
&lt;p&gt;Unfortunately I will have to use ANT modules in a following part of my project, but i have some source code that can be very helpful to me when i ll arrive at that point. I have little experience with ATMega and STmicrocontoller but you are right this SoC&amp;#39;s are not easy at all. Thanks to the excellent Nordic costumer service I am sure i ll made it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;polimarte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/271981?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 08:27:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86c5c476-f868-4d4f-8a7c-5f4da0c69c83</guid><dc:creator>awneil</dc:creator><description>[quote userid="87869" url="~/f/nordic-q-a/65978/interfacing-a-sensor-hub-with-twi-drivers/271969#271969"]Nordic SoC&amp;#39;s might not be the easiest starting place to learn embedded programming. Mainly, this is because our SoC&amp;#39;s are pretty high-end, with a lot of customizable functionality[/quote]
&lt;p&gt;&lt;strong&gt;Absolutely!&lt;/strong&gt; The fact that the nRF52 is not just a microcontroller but also integrates a complete radio systems adds a whole lot of complication.&lt;/p&gt;
&lt;p&gt;(not picking on Nordic here - the same would apply to any comparable SoC)&lt;/p&gt;
&lt;p&gt;I would strongly suggest that you spend some time on a simpler, &amp;quot;conventional&amp;quot; microcontroller to learn the basics of embedded development.&lt;/p&gt;
&lt;p&gt;eg, as noted above, I2C comms and&amp;nbsp; your Sensor Hub are not at all related to BLE - that&amp;#39;s just an unnecessary extra complication at the learning stage.&lt;/p&gt;
&lt;p&gt;Here are some general beginner &amp;quot;getting started&amp;quot; tips for microcontrollers:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.avrfreaks.net/comment/2079906#comment-2079906"&gt;https://www.avrfreaks.net/comment/2079906#comment-2079906&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/271969?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 08:09:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36c0d68b-1e53-43d2-8b00-c316ce798d21</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="polimarte "]Thanks a lot Karl!![/quote]
&lt;p&gt;No problem at all, Polimarte!&lt;/p&gt;
[quote user="polimarte "]I understand that there are several errors and i expected that so thanks to help me!!&amp;nbsp;[/quote]
&lt;p&gt;I am glad to hear that you took it this way, and that my comments was well received! :)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user="polimarte "]My goal is to adapt code originally made for arduino in c++, using keil uvision, that&amp;#39;s probably the reason why there is such confusion about the conventions.&amp;nbsp;[/quote]
&lt;p&gt;This is a clear, and achievable goal, great! For starters, I would recommend adopting a similar coding style as demonstrated in the SDK examples, if possible.&lt;br /&gt;Since the particular variable and function names wont matter following compilation, there is no reason not to write out descriptive names for each variable and function. This will also make it much easier for you to &amp;#39;get back into the code&amp;#39; if you should take a break at any time, or come back to the code after having worked on another project for a while.&lt;/p&gt;
[quote user="polimarte "]&lt;span&gt;Unfortunately i am a total beginner to&amp;nbsp;embedded systems and i&amp;nbsp;&lt;/span&gt;&lt;span&gt;have to admit that&lt;/span&gt;&lt;span&gt;&amp;nbsp;i am lacking of some important basics here.&lt;/span&gt;&lt;span&gt;I am sure&lt;/span&gt;&lt;span&gt;&amp;nbsp;that i ll understand a bit more now with your hints.&lt;/span&gt;[/quote]
&lt;p&gt;No worries, we all were new to this at some point, and the best way to get better is to keep trying! I will say this though, Nordic SoC&amp;#39;s might not be the easiest starting place to learn embedded programming. Mainly, this is because our SoC&amp;#39;s are pretty high-end, with a lot of customizable functionality, configurations, and optimizations.&lt;br /&gt;This makes the learning curve for developing with out SoC&amp;#39;s pretty steep - but because of this, once you get the hang of it you will have plenty of tools and functionality at your disposal!&lt;br /&gt;&lt;br /&gt;It is great that you are starting out with the TWI drivers, and are working on how to interface with a sensor. This is a good way to start.&lt;br /&gt;Especially the BLE parts of the nRF5 SDK examples&amp;#39; code might seem daunting when you first come across it, but once you get familiar with it it will be just as straight forward as the TWI drivers!&lt;br /&gt;Please do not hesitate to ask, if you should get stuck anywhere in your project.&lt;/p&gt;
[quote user="polimarte "]I ll ask help again, hope to present a more reasonable code in the future.&amp;nbsp;[/quote]
&lt;p&gt;Great! That sounds like a good plan, I look forward to hearing how you progress with your project.&lt;br /&gt;&lt;br /&gt;Good luck with your development!&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: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/271852?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 15:23:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdf3085e-0d03-4fb8-ad6d-554897215d75</guid><dc:creator>polimarte </dc:creator><description>&lt;p&gt;Thanks a lot Karl!!&lt;/p&gt;
&lt;p&gt;I understand that there are several errors and i expected that so thanks to help me!!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My goal is to adapt code originally made for arduino in c++, using keil uvision, that&amp;#39;s probably the reason why there is such confusion about the conventions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Unfortunately i am a total beginner to&amp;nbsp;embedded systems and i&amp;nbsp;&lt;/span&gt;&lt;span&gt;have to admit that&lt;/span&gt;&lt;span&gt;&amp;nbsp;i am lacking of some important basics here.&lt;/span&gt;&lt;span&gt;I am sure&lt;/span&gt;&lt;span&gt;&amp;nbsp;that i ll understand a bit more now with your hints.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I ll ask help again, hope to present a more reasonable code in the future.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;polimarte&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/271831?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 14:04:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:535f6154-63a7-4855-bcee-d92c1659bf54</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Polimarte,&lt;/p&gt;
[quote user="polimarte "]thanks for answering to my question.[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;/p&gt;
[quote user="polimarte "]Sorry this can be a stupid question but i have just started to study the TWI config and to use nordic components.[/quote]
&lt;p&gt;No need to apologize - we were all new to these things at one point or another. It is great that you are familiarizing with the TWI protocol and the drivers and libraries supplied with the SDK on your own! The forum is here whenever you should encounter any issues or questions with any of these, there is no harm in asking! :)&lt;/p&gt;
[quote user="polimarte "]I ll use&lt;span&gt;&amp;nbsp;definitely the NRFX_TWIM drivers, but Why i cannot use the normal TWI drivers and define by myself the primary and secondary buffer (and merge them) each time? Is there some problem with communication?&lt;/span&gt;[/quote]
&lt;p&gt;I am not sure I understand what you mean when you ask why you can not use the &amp;quot;normal TWI drivers&amp;quot; - are you here referring to the legacy nrf_drv_twi_* driver?&lt;br /&gt;As you can see in the NRFX_TWIM_XFER_DESC_TX documentation, you may very well set up more than 1 byte for TX with this description. As you can see from the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__nrfx__twim.html&amp;amp;anchor=gae53a1bebcd5961e1cd7a79e4039b8c88"&gt;nrfx_twim_xfer function documentation&lt;/a&gt;&amp;nbsp;you may use the different flag option to initiate different types of transfers - such as the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrfx__twim.html#gad63c4a75991aea41e27e21e562bd04cd"&gt;NRFX_TWIM_FLAG_TX_NO_STOP&lt;/a&gt;&amp;nbsp;flag, to signal that the TX transfer is not done yet.&lt;br /&gt;&lt;br /&gt;If you are going to do a TXRX ( or another of the transfer options ) sending ( which might require the secondary buffer that you mention ), you should instead use the NRFX_TWIM_XFER_DESC_TXRX.&amp;nbsp;&lt;/p&gt;
[quote user="polimarte "]I have implemented the read and write function using nrf_drv_twi with rx and tx buffer, whose lengths depens on how many bytes i need each time. Here an Example of Write byte function, Does it make any sense to you?[/quote]
&lt;p&gt;You have only shared your&amp;nbsp;&lt;em&gt;writeByte&lt;/em&gt; implementation, so I can not say anything about your function for reading.&lt;br /&gt;Regarding the&amp;nbsp;&lt;em&gt;writeByte&amp;nbsp;&lt;/em&gt;function code you shared above, I have the following comments:&lt;br /&gt;&lt;br /&gt;- The return type of your function is incorrect since you sometimes intend to return error codes, such as those possibly returned by &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__nrf__drv__twi.html&amp;amp;anchor=ga6c83eac2d358bc8fb5b53c53f22506b6"&gt;nrf_drv_twi_tx&lt;/a&gt;&amp;nbsp;with is an&amp;nbsp;&lt;em&gt;ret_code_t&amp;nbsp;&lt;/em&gt;which is uint32_t type.&lt;br /&gt;&lt;br /&gt;- You are also mixing what you might be returning, you should not do this as it will make it very hard to use the functions return value ( you will not know if the function returns an error or the status byte). Instead, you should provide the function with a buffer, in which it may place the statusbyte, or whatever else it outputs.&lt;br /&gt;&lt;br /&gt;- Your usage of the &lt;em&gt;timeout&lt;/em&gt; might not be as intended, since it will run down the while using CPU cycles, not ms or us or anything &amp;quot;human readable&amp;quot;. So, the timeout feature might not work quite as you have intended, but this is just a guess from my side, since I neither know the value nor calculation used to disern&amp;nbsp;&lt;em&gt;TWI_TIMEOUT&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;- Your &lt;em&gt;rx_buffer&lt;/em&gt; is used as an array, but&amp;nbsp;is not declared and instantiated as such.&lt;br /&gt;&lt;br /&gt;- You are returning if the result of nrf_drv_twi_tx is != NRF_SUCCESS, this is good. But, since you also might be returning the status register, I am not sure that you are passing the returned value of&amp;nbsp;&lt;em&gt;writeByte&lt;/em&gt; through an APP_ERROR_CHECK. Do you do this?&lt;br /&gt;&lt;br /&gt;- I am guessing that the&amp;nbsp;&lt;em&gt;twi_rx_done&amp;nbsp;&lt;/em&gt;and&amp;nbsp;&lt;em&gt;twi_tx_done&amp;nbsp;&lt;/em&gt;variables are set to true in the twi event handler, is this correct?&lt;br /&gt;&lt;br /&gt;- You are not declaring &amp;quot;StatusByte&amp;quot; at the end, and you are setting it equal to what I am guessing should have been a pointer to an uint8_t array ( which it is not ).&lt;br /&gt;&lt;br /&gt;- Broadly speaking, it also seems that you are not following a particular&amp;nbsp;convention with your variable and function naming, and I highly recommend doing so. For example, you sometimes use Pascal, sometimes camel, and you also use underscores in front of your function parameters - you should be consistent here, and you should not use underscores as a prefix for variable names.&lt;br /&gt;&lt;br /&gt;- Your call to &lt;em&gt;nrf_drv_twi_tx&lt;/em&gt;&amp;nbsp;looks all right, if your &amp;quot;address&amp;quot; parameter is as intended. I am guessing that you forgot to replace it with the &lt;em&gt;_writeByte&amp;nbsp;&lt;/em&gt;parameter.&lt;/p&gt;
&lt;p&gt;- Your call to&amp;nbsp;&lt;em&gt;nrf_drv_twi_rx&amp;nbsp;&lt;/em&gt;also looks ok, but here you are again passing the variable&amp;nbsp;&lt;em&gt;&amp;quot;address&amp;quot;&lt;/em&gt; which I think might be incorrect ( but I do not know what&amp;nbsp;&lt;em&gt;&lt;/em&gt;&lt;em&gt;address&lt;/em&gt; actually points to, so I&amp;nbsp;&lt;em&gt;might&lt;/em&gt; be wrong&amp;nbsp;about this ).&lt;br /&gt;&lt;br /&gt;I do not mean to sound crass, I am just trying to help.&lt;br /&gt;Please take a look at the above comments, and let me know if you should have any questions.&lt;br /&gt;If you review your code with these comments in mind, feel free to share the updated version here, and I will take a look at it again! :)&amp;nbsp;&lt;/p&gt;
&lt;p&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: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/271557?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2020 13:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec3ddd47-665a-403f-9009-65623d9ac471</guid><dc:creator>polimarte </dc:creator><description>&lt;p&gt;Hi Karl, thanks for answering to my question.&lt;/p&gt;
&lt;p&gt;I ll use&lt;span&gt;&amp;nbsp;definitely the NRFX_TWIM drivers, but Why i cannot use the normal TWI drivers and define by myself the primary and secondary buffer (and merge them) each time? Is there some problem with communication?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have implemented the read and write function using nrf_drv_twi with rx and tx buffer, whose lengths depens on how many bytes i need each time. Here an Example of Write byte function, Does it make any sense to you?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
uint8_t writeByte( uint8_t _familyByte, uint8_t _indexByte, uint8_t _writeByte)
{

        uint32_t err_code;
        
        uint32_t timeout = TWI_TIMEOUT;
        uint8_t StatusByte=0;     
       
        uint8_t lenght = sizeof(_familyByte) + sizeof(_indexByte) + sizeof(_writeByte);

        uint8_t rx_buffer;

        uint8_t tx_buffer[] = {_familyByte, _indexByte, _writeByte};   //cazzo devo fare qua 

        err_code = nrf_drv_twi_tx(&amp;amp;m_twi_instance, address, tx_buffer, lenght, true);
        if (err_code != NRF_SUCCESS) return err_code;

        while ((!twi_tx_done) &amp;amp;&amp;amp; --timeout) ;
        if (!timeout) return NRF_ERROR_TIMEOUT;
        twi_tx_done = false;

        err_code = nrf_drv_twi_rx(&amp;amp;m_twi_instance, address, &amp;amp;rx_buffer, sizeof(rx_buffer));
        if (err_code != NRF_SUCCESS) return err_code;

        timeout = OXI_TWI_TIMEOUT;
        while ((!twi_rx_done) &amp;amp;&amp;amp; --timeout) ;
        if (!timeout) return NRF_ERROR_TIMEOUT;
        twi_rx_done = false;

        StatusByte = rx_buffer;

        return StatusByte;
      
    }&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Sorry this can be a stupid question but i have just started to study the TWI config and to use nordic components.&lt;/p&gt;
&lt;p&gt;Thanks a lot,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;polimarte&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/271491?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2020 11:51:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01e34b85-8a33-4798-b14f-25e25a894991</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Polimarte,&lt;br /&gt;&lt;br /&gt;Sorry for my late reply.&lt;/p&gt;
[quote user="polimarte "]i&amp;#39;am sorry to have given a very&amp;nbsp;vague question.[/quote]
&lt;p&gt;Do not worry, asking the right questions is an art in and of itself. :)&amp;nbsp;&lt;/p&gt;
[quote user="polimarte "]I have understood a bit more, now i can describe well my problem, maybe.[/quote]
&lt;p&gt;Great! Let us see if we can&amp;#39;t get to the bottom of this issue then.&lt;/p&gt;
[quote user="polimarte "]If i need to transmit a series if byte as for example only the Family and Index Byte in order to write,&amp;nbsp; would i need a buffer (p_data) as an array of dimension 2, able to store these two bytes?&amp;nbsp;[/quote]
&lt;p&gt;With the information you have provided above, it seems to me that your device requires the start of a typical write to contain ADDR - FAMILY - INDEX - content.&lt;br /&gt;Based on this&amp;nbsp; I would recommend that you implement this as an array of commands in an array, which you then queue for transfer. You can do this by providing the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__nrfx__twim.html&amp;amp;anchor=gaf5c6310cff2a4288810f066a8d56d1a2"&gt;NRFX_TWIM_XFER_DESC_TX&lt;/a&gt;&amp;nbsp;macro with this array of commands, and then passing this this to the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fgroup__nrfx__twim.html&amp;amp;anchor=gae53a1bebcd5961e1cd7a79e4039b8c88"&gt;nrfx_twim_xfer&lt;/a&gt;&amp;nbsp;function.&lt;br /&gt;&lt;br /&gt;Alternatively, if if you do not intend to use the nrfx_twim driver, you could take a look at how some other TWI master drivers for specific components have been implemented. You could see some examples of this in the &lt;em&gt;SDK/&lt;/em&gt;&lt;em&gt;components/driver_ext&lt;/em&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;folder of the SDK.&lt;br /&gt;For example, you could see the external driver for the lis2dh12, located in&amp;nbsp;&lt;em&gt;SDK/components/drivers_ext/lis2dh12&lt;/em&gt;&lt;br /&gt;Especially, note how all the registers are defined in the internal file - this makes writing the driver a lot easier - and how there are functions for specific tasks. Implementing these config and control functions makes using your driver much easier.&lt;br /&gt;Even if you are planning to use the nrfx_twim driver, you could use the same general structure / approach from this driver, in your driver.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Lastly, I also recommend that you do a search on github for the specific component you are working with, if the internal registers file is not provided by the component manufacturer - chances are that someone already have transcribed all the register addresses for your particular component, which greatly reduce the time you have to sit and &amp;#39;transcribe&amp;#39; these addressees from the datasheet directly.&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: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/270896?ContentTypeID=1</link><pubDate>Tue, 22 Sep 2020 14:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efeecea1-a24c-4dca-8cd2-5a1f59071a99</guid><dc:creator>polimarte </dc:creator><description>&lt;p&gt;Hi i&amp;#39;am sorry to have given a very&amp;nbsp;vague question. I have understood a bit more, now i can describe well my problem, maybe.&lt;/p&gt;
&lt;p&gt;The read and write action on&amp;nbsp;my sensor hub are described as:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-_2800_56_2900_.png" /&gt;&lt;/p&gt;
&lt;p&gt;and i want to use the nrf_drv_tx and rx in order to implement these actions.&lt;/p&gt;
&lt;p&gt;If i have the function&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ret_code_t nrf_drv_twi_tx	(	nrf_drv_twi_t const * 	p_instance,
        uint8_t 	address,
        uint8_t const * 	p_data,
        uint8_t 	length,
        bool 	no_stop 
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;where&lt;/p&gt;
&lt;table class="params"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="paramdir" colspan="1" rowspan="1"&gt;[in]&lt;/td&gt;
&lt;td class="paramname" colspan="1" rowspan="1"&gt;p_instance&lt;/td&gt;
&lt;td colspan="1" rowspan="1"&gt;Pointer to the driver instance structure.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="paramdir" colspan="1" rowspan="1"&gt;[in]&lt;/td&gt;
&lt;td class="paramname" colspan="1" rowspan="1"&gt;address&lt;/td&gt;
&lt;td colspan="1" rowspan="1"&gt;Address of a specific slave device (only 7 LSB).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="paramdir" colspan="1" rowspan="1"&gt;[in]&lt;/td&gt;
&lt;td class="paramname" colspan="1" rowspan="1"&gt;p_data&lt;/td&gt;
&lt;td colspan="1" rowspan="1"&gt;Pointer to a transmit buffer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="paramdir" colspan="1" rowspan="1"&gt;[in]&lt;/td&gt;
&lt;td class="paramname" colspan="1" rowspan="1"&gt;length&lt;/td&gt;
&lt;td colspan="1" rowspan="1"&gt;Number of bytes to send.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="paramdir" colspan="1" rowspan="1"&gt;[in]&lt;/td&gt;
&lt;td class="paramname" colspan="1" rowspan="1"&gt;no_stop&lt;/td&gt;
&lt;td colspan="1" rowspan="1"&gt;If set, the stop condition is not generated on the bus after the transfer has completed successfully (allowing for a repeated start in the next transfer).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If i need to transmit a series if byte as for example only the Family and Index Byte in order to write,&amp;nbsp; would i need a buffer (p_data) as an array of dimension 2, able to store these two bytes?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and so for the reception if i want to retrieve the Status and the Response byte would i need another buffer with same dimension?&lt;/p&gt;
&lt;p&gt;Hope to hear you again and thanks for help me!&lt;/p&gt;
&lt;p&gt;polimarte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/270057?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 11:28:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c14833a-6b34-40d1-9c66-d210c83ed3c1</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f603.svg" title="Smiley"&gt;&amp;#x1f603;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/270054?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 11:25:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa280835-ceab-4846-a5c7-a53fdc128263</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;If I could have upvoted your answers twice, or otherwise highlighted your answers here I definitely would have, @awneil !&lt;br /&gt;&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: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/270047?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 11:02:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2897572-6d49-444a-81cb-17c3715d1a75</guid><dc:creator>awneil</dc:creator><description>[quote userid="87869" url="~/f/nordic-q-a/65978/interfacing-a-sensor-hub-with-twi-drivers/269982"]I would recommend reading the Sensor Hubs documentation, to figure out how to implement the interface.[/quote]
&lt;p&gt;Absolutely!&lt;/p&gt;
&lt;p&gt;That is always the basic first step in interfacing to &lt;em&gt;&lt;strong&gt;any&lt;/strong&gt;&lt;/em&gt; device!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.8052mcu.com/forum/read/160143" rel="noopener noreferrer" target="_blank"&gt;&lt;strong&gt;How To Interface &lt;em&gt;Anything&lt;/em&gt; To Anything &lt;em&gt;Else&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And don&amp;#39;t forget to look at the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Product Page&lt;/strong&gt;&amp;nbsp;on the manufacturer&amp;#39;s websites: &amp;nbsp;that is where the manufacturers will present all their supporting collateral - including datasheets, application notes, example code, etc:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.avrfreaks.net/comment/2839426#comment-2839426" rel="noopener noreferrer" target="_blank"&gt;https://www.avrfreaks.net/commen...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.avrfreaks.net/comment/2842546#comment-2842546" rel="noopener noreferrer" target="_blank"&gt;https://www.avrfreaks.net/commen...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Again, this is a key first step in working with&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;strong&gt;any&lt;/strong&gt;&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;new part.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/269982?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 05:55:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5db33f8-46bd-45ca-8858-f80c2591cc4f</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Polimarte,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]Have you some ideas on how i can use the family and index byte of the Sensor Hub in order to retrieve the correct byte?&amp;nbsp;[/quote]
&lt;p&gt;It is as @awneil says - we do not support Arduino, unfortunately.&lt;br /&gt;However, as awneil mentions, I would recommend reading the Sensor Hubs documentation, to figure out how to implement the interface.&lt;br /&gt;It will be easier for you to see what the Sensor Hub is expecting to receive from its datasheet, rather than reading it and translating it directly from an Arduino implementation.&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: Interfacing a Sensor Hub with TWI drivers?</title><link>https://devzone.nordicsemi.com/thread/269810?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2020 09:44:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e88953e1-ca9f-4625-b523-0e47f862e2b6</guid><dc:creator>awneil</dc:creator><description>[quote userid="92644" url="~/f/nordic-q-a/65978/interfacing-a-sensor-hub-with-twi-drivers"]Arduino [/quote]
&lt;p&gt;Note that Arduino is not supported by Nordic - you need to go to the Arduino forums for Arduino support.&lt;/p&gt;
[quote userid="92644" url="~/f/nordic-q-a/65978/interfacing-a-sensor-hub-with-twi-drivers"]how i can use the family and index byte of the Sensor Hub in order to retrieve the correct byte?[/quote]
&lt;p&gt;What does the &lt;strong&gt;documentation&lt;/strong&gt; for this unspecified &amp;quot;Sensor Hub&amp;quot; tell you?&lt;/p&gt;
&lt;p&gt;Note that the &amp;quot;Sensor Hub&amp;quot; neither knows nor cares what microcontroller you use, so this is all down to the particular &amp;quot;Sensor Hub - not specific to the microcontroller.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>