<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processors中的主题 Re: HTS221 driver integration for imx6</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672329#M103582</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one can check how i2c module is configured by&lt;BR /&gt;Resource Domain Controller (RDC), described in Chapter 52&lt;BR /&gt;i.MX6SX Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jun 2017 23:15:33 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2017-06-27T23:15:33Z</dc:date>
    <item>
      <title>HTS221 driver integration for imx6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672325#M103578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class=""&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having trouble with HTS221 device driver integration (for a FreeRTOS app). ST provides a platform independent driver (see &lt;A href="https://community.st.com/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fen%2Fmems-and-sensors%2Fhts221.html" rel="nofollow" target="_blank"&gt;http://www.st.com/en/mems-and-sensors/hts221.html&lt;/A&gt;&amp;nbsp;). But those drivers have functions which need to be remapped :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the user must redefine the proper HTS221_WriteReg&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define HTS221_WriteReg(RegAddr, NumByteToWrite, Data)&amp;nbsp; HAL_WriteReg(HTS221_I2C_ADDRESS, RegAddr,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NumByteToWrite, Data)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use this driver with I2C but I don't find how, since I'm not use to play with drivers. The two pictures after come from the imx6 freertos bsp. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did someone already do this ? Or use another similary driver with an imx6 board ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QD&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18687_18687.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/123048i4414082EEFF249B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="18687_18687.png" alt="18687_18687.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18686_18686.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/123049i3C468072909F8696/image-size/large?v=v2&amp;amp;px=999" role="button" title="18686_18686.png" alt="18686_18686.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 14:16:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672325#M103578</guid>
      <dc:creator>dexter2306</dc:creator>
      <dc:date>2017-06-23T14:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: HTS221 driver integration for imx6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672326#M103579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Quentin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;seems it is necessary to write own HTS221_WriteReg(RegAddr, NumByteToWrite, Data)&lt;/P&gt;&lt;P&gt;function using examples in i.MX FreeRTOS, actually sect.9.2.3 describes necessary steps for it.&lt;/P&gt;&lt;P&gt;For simplicity one can start with&amp;nbsp; NumByteToWrite=1 and use examples in&lt;/P&gt;&lt;P&gt;FreeRTOS/imx6sx_sdb_m4/driver_examples/i2c_imx/i2c_polling_sensor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 11:25:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672326#M103579</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-06-26T11:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: HTS221 driver integration for imx6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672327#M103580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you igorpadykov for answering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I understood I had to use the 9.2.3 section. Yet, it seems to me that we need an extra parameter, to specify the i2c bus adress. Hereafter is the function I wrote,&amp;nbsp; wich is not compatible with the HTS221_ReadReg macro used in the ST driver. How can I do to avoid this extra parameter ? Using global variable ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTS221_Error_et IMX_HTS221_ReadReg(&lt;STRONG&gt;I2C_Type* base&lt;/STRONG&gt;, uint8_t RegAddr, uint16_t NumByteToRead, uint8_t* Data) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/*&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Following instructions of FreeRTOS_BSP_i.MX6SoloX_API_Reference_Manual.pdf&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;uint8_t writeBytes[2];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;HTS221_Error_et status = HTS221_OK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Clear I2C interrupt flag to avoid spurious interrupt */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;I2C_ClearStatusFlag(base, i2cStatusInterrupt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* setting RX mode */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;I2C_SetDirMode(base, i2cDirectionReceive);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// setting master mode to send start signal&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;I2C_SetWorkMode(base,i2cModeMaster);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Change to receive state. */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;I2C_SetDirMode(base, i2cDirectionReceive);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;*Data = I2C_ReadByte(base);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Will be modified later :&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return(true);&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 12:16:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672327#M103580</guid>
      <dc:creator>dexter2306</dc:creator>
      <dc:date>2017-06-26T12:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: HTS221 driver integration for imx6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672328#M103581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've also tried to start with i2c_polling_sensor example from free rtos. But it seems I can't access to my device; I'm wondering if the error come from freertos, or if I have to change something on the kernel configuration of the board. Indeed, if the i2c driver is for instance taken by the A9 core, the M4 can't have it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has no one ever attempted such a thing ? (adding an i2c device to the imx6solox eval board, handled by free rtos on the m4 core).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2017 15:33:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672328#M103581</guid>
      <dc:creator>dexter2306</dc:creator>
      <dc:date>2017-06-27T15:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: HTS221 driver integration for imx6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672329#M103582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one can check how i2c module is configured by&lt;BR /&gt;Resource Domain Controller (RDC), described in Chapter 52&lt;BR /&gt;i.MX6SX Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2017 23:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/HTS221-driver-integration-for-imx6/m-p/672329#M103582</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-06-27T23:15:33Z</dc:date>
    </item>
  </channel>
</rss>

