<?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>topic Re: [NHS3100] Questions/Issues about I2C driver in NFC</title>
    <link>https://community.nxp.com/t5/NFC/NHS3100-Questions-Issues-about-I2C-driver/m-p/725294#M2934</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone has suggestion?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Apr 2018 07:02:33 GMT</pubDate>
    <dc:creator>aresmarser</dc:creator>
    <dc:date>2018-04-02T07:02:33Z</dc:date>
    <item>
      <title>[NHS3100] Questions/Issues about I2C driver</title>
      <link>https://community.nxp.com/t5/NFC/NHS3100-Questions-Issues-about-I2C-driver/m-p/725293#M2933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am woking on NHS3100 and I added an accelerometer sensor&amp;nbsp;LIS3DH.&lt;/P&gt;&lt;P&gt;I added my sensor test code based on "app_example_dp_i2c" from the NHS3100 SDK "release_mra2_10_1_nhs3100.zip".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I can read/write the register of the sensor by calling the I2C API funciton "Chip_I2C_MasterCmdRead"/"Chip_I2C_MasterSend" respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem I met is that I canNOT operate the I2C by calling&amp;nbsp; the API functions above&amp;nbsp;repeatedly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My test items/steps are:&lt;/P&gt;&lt;P&gt;1. send data to I2C slave to get the register data of the sensor by call "&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Chip_I2C_MasterCmdRead&lt;/SPAN&gt;";&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;send data to I2C slave to write the register of the sensor&amp;nbsp;by call "Chip_I2C_MasterSend&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;send data to I2C slave to get the register data of the sensor again by call "&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Chip_I2C_MasterCmdRead&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I just have only item 1 (or 2, or 3) to test, it is ok for the correct operation and result.&lt;/P&gt;&lt;P&gt;But when I have the three items to test together, it is failed to operate the item 2 and item 3 for the results.&lt;/P&gt;&lt;P&gt;The API function never return for item 2 and item 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;are the code snippets:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;DIV&gt;// for test item &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;1. send data to I2C slave to get the register data of the sensor by call "&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Chip_I2C_MasterCmdRead&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;";&lt;/SPAN&gt;&lt;BR /&gt;static void Slave0Access(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t slaveAddr = 0x19;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t regAddr = 0x20;&amp;nbsp; // 0x0F;&lt;BR /&gt;&amp;nbsp;uint8_t readData = 0;&lt;/DIV&gt;&lt;DIV&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Slave0Access\r\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_I2C_MasterCmdRead(I2C0, slaveAddr,&amp;nbsp; (uint8_t *)&amp;amp;regAddr, (uint8_t *)&amp;amp;readData, 1);&lt;BR /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Read slaveAddr 0x%02X, regAddr 0x%02X, readData 0x%02X\n\r", slaveAddr, regAddr, readData);&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;// for test item&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;2.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;send data to I2C slave to write the register of the sensor&amp;nbsp;by call "Chip_I2C_MasterSend&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;static void Slave1Access(void)&lt;BR /&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; uint8_t slaveAddr = 0x19;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; uint8_t regAddr = 0x20;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; uint8_t writeData = 0x57;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; uint8_t txBuf[2] = {0x00};&lt;/DIV&gt;&lt;DIV&gt;//&amp;nbsp;&amp;nbsp; printf("Slave1Access\r\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; txBuf[0] = regAddr;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; txBuf[1] = writeData;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; Chip_I2C_MasterSend(I2C0, slaveAddr,txBuf, 2);&lt;BR /&gt;//&amp;nbsp;&amp;nbsp; printf("Write slaveAddr 0x%02X, regAddr 0x%02X, writeData 0x%02X\n\r", slaveAddr, regAddr, writeData);&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;// for test item&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;3.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;send data to I2C slave to get the register data of the sensor again by call "&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Chip_I2C_MasterCmdRead&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;static void Slave2Access(void)&lt;BR /&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;uint8_t slaveAddr = 0x19;&lt;BR /&gt;&amp;nbsp;uint8_t regAddr = 0x20;&lt;BR /&gt;&amp;nbsp;uint8_t readData = 0;&lt;/DIV&gt;&lt;DIV&gt;// printf("Slave2Access\r\n");&lt;BR /&gt;&amp;nbsp;Chip_I2C_MasterCmdRead(I2C0, slaveAddr,&amp;nbsp; (uint8_t*)&amp;amp;regAddr, (uint8_t*)&amp;amp;readData, 1);&lt;BR /&gt;// printf("Read slaveAddr 0x%02X, regAddr 0x%02X, readData 0x%02X\n\r", slaveAddr, regAddr, readData);&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;// here is the calling for test 1, 2, 3:&lt;/DIV&gt;&lt;DIV&gt;void Master_PollSlaves(void)&lt;BR /&gt;{&lt;BR /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Master_PollSlaves\n\r");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /** Device Id Use Case*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Slave0Access();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /** Temperature Use Case */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Slave1Access();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /** LED Use Case */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Slave2Access();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /** Scratchpad/Counter Use Case */&lt;BR /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; Slave3Access();&lt;/DIV&gt;&lt;DIV&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_Clock_System_BusyWait_ms(I2C_MASTER_COMM_INTERVAL);&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;------&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;The whole project is attached:&lt;/DIV&gt;&lt;DIV&gt;(1) "original_code_from_SDK.7z"&lt;/DIV&gt;&lt;DIV&gt;(2) "workspace_sensor_test_code.7z"&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;It is very appreciated if anyone can help me to review if anything wrong.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Arna&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 10:00:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/NHS3100-Questions-Issues-about-I2C-driver/m-p/725293#M2933</guid>
      <dc:creator>aresmarser</dc:creator>
      <dc:date>2018-03-22T10:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: [NHS3100] Questions/Issues about I2C driver</title>
      <link>https://community.nxp.com/t5/NFC/NHS3100-Questions-Issues-about-I2C-driver/m-p/725294#M2934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone has suggestion?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2018 07:02:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/NHS3100-Questions-Issues-about-I2C-driver/m-p/725294#M2934</guid>
      <dc:creator>aresmarser</dc:creator>
      <dc:date>2018-04-02T07:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: [NHS3100] Questions/Issues about I2C driver</title>
      <link>https://community.nxp.com/t5/NFC/NHS3100-Questions-Issues-about-I2C-driver/m-p/725295#M2935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Hello,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Please refer to the&amp;nbsp;app_example_dp_i2c example. This example demonstrates the configuration of the I2C for Master and Slave functionality. You will find it in the following path:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;...\release_mra2_10_1_nhs3100.zip\release_mra2_10_1_nhs3100\sw\nss\app_example_dp_i2c&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Regards,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Ivan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2018 16:21:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/NHS3100-Questions-Issues-about-I2C-driver/m-p/725295#M2935</guid>
      <dc:creator>IvanRuiz</dc:creator>
      <dc:date>2018-06-14T16:21:32Z</dc:date>
    </item>
  </channel>
</rss>

