<?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>MCUXpresso SDKのトピックRe: Question about i2cio module</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769250#M736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to debug with breakpoints as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Chip_I2C_MasterStateHandler.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/13938i6D796CFDE4025B12/image-size/large?v=v2&amp;amp;px=999" role="button" title="Chip_I2C_MasterStateHandler.png" alt="Chip_I2C_MasterStateHandler.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Chip_I2C_MasterSend.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/13981i307364EAF9E20D81/image-size/large?v=v2&amp;amp;px=999" role="button" title="Chip_I2C_MasterSend.png" alt="Chip_I2C_MasterSend.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Chip_I2C_MasterRead.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14125i264F387DEE25829F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Chip_I2C_MasterRead.png" alt="Chip_I2C_MasterRead.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;P style="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; padding: 0px; margin: 0px;"&gt;And here is my test code snippet ------------&lt;/P&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; 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; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; overflow-x: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&amp;nbsp; uint8_t slaveAddr = 0x19;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; overflow-x: visible; position: static; padding: 0px; margin: 0px;" /&gt;&amp;nbsp; uint8_t regAddr = 0x20;&amp;nbsp; // 0x0F;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; overflow-x: visible; position: static; padding: 0px; margin: 0px;" /&gt;&amp;nbsp; uint8_t readData = 0;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; overflow-x: visible; position: static; padding: 0px; margin: 0px;" /&gt;&amp;nbsp; int result = 0;&lt;/DIV&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; 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; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; overflow-x: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt; &lt;/DIV&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; 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; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; overflow-x: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&amp;nbsp; Chip_I2C_MasterSend(I2C0, slaveAddr, &amp;amp;regAddr, 1);&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; overflow-x: visible; position: static; padding: 0px; margin: 0px;" /&gt;&amp;nbsp; result = Chip_I2C_MasterRead(I2C0, slaveAddr, &amp;amp;readData, 1);&lt;/DIV&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; 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; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; overflow-x: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;-------------------------------------------------------------------------------------&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;(1) For "&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; line-height: 25.95px; 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;"&gt;Chip_I2C_MasterSend&lt;/SPAN&gt;" procedure, "Chip_I2C_MasterStateHandler" hit the breakpoint and finally&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; line-height: 25.95px; 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;"&gt;"&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; line-height: 25.95px; 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;"&gt;Chip_I2C_MasterSend&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; line-height: 25.95px; 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;"&gt;" hit the breakpoint, that is, the operation was successful.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;(2) But for "Chip_I2C_MasterRead" procedure, both&amp;nbsp;"Chip_I2C_MasterStateHandler"&amp;nbsp; and&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; line-height: 25.95px; 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;"&gt;Chip_I2C_MasterRead&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; line-height: 25.95px; 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;"&gt;" never hit the breakpoints!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Here is the problem I met.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Any idea how I should debug to dig out the root cause?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;I have sufferred from this problem for several days.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Look forward to your support and help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Appreciated if you could help me more.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Many thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Arna&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Mar 2018 06:19:35 GMT</pubDate>
    <dc:creator>aresmarser</dc:creator>
    <dc:date>2018-03-26T06:19:35Z</dc:date>
    <item>
      <title>Question about i2cio module</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769244#M730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sirs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am studying NHS3100 board kit.&lt;/P&gt;&lt;P&gt;I want to add my&amp;nbsp;motion sensor with I2C interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read some document and it is said that "&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Roboto,sans-serif; font-size: 14px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 22px; 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;"&gt;The user of the I2CIO module only needs to use the API functions below to have full I2C communication. &lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried my test and the code snippet based on "app_demo_dp_tlogger" is below but it does NOT work.&lt;/P&gt;&lt;P&gt;And I have already linked the mods "i2cio" into my project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RegData = 0x57;&lt;BR /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; Sensor_WriteReg(LIS3DH_I2C_DEVICE2_WRITE_ADDR, LIS3DH_CTRL_REG1, &amp;amp;RegData);&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;uint8_t sendBuf[2] = {0x00};&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2CIO_Init();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;sendBuf[0] = LIS3DH_CTRL_REG1;&lt;BR /&gt;&amp;nbsp;sendBuf[1] = 0x57;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2CIO_Tx(sendBuf,2);&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;printf("Write slaveAddr 0x%02X, reg_addr 0x%02X, Write Data 0x%02X\r\n", LIS3DH_I2C_DEVICE2_WRITE_ADDR, LIS3DH_CTRL_REG1, RegData);&lt;/DIV&gt;&lt;DIV&gt;---&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;The running/testing log is below:&lt;/DIV&gt;&lt;DIV&gt;---&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Sensor_Init for I2C...&lt;/DIV&gt;&lt;DIV&gt;Chip_I2C_MasterSend slaveAddr 0x32, txBuff: 20 57&lt;/DIV&gt;&lt;DIV&gt;Chip_I2C_MasterTransfer&lt;/DIV&gt;&lt;DIV&gt;Chip_I2C_EventHandler: I2C event 3&lt;/DIV&gt;&lt;DIV&gt;Chip_I2C_EventHandler: I2C event 1&lt;/DIV&gt;&lt;DIV&gt;Chip_I2C_EventHandler: I2C transfer status 4&lt;/DIV&gt;&lt;DIV&gt;---&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;"&gt;From my observation, the routine stuck in the while statement in the funciton "Chip_I2C_EventHandler": &lt;/SPAN&gt;&lt;BR style="background-color: transparent; box-sizing: border-box; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;" /&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;"&gt;--- &lt;/SPAN&gt;&lt;BR style="background-color: transparent; box-sizing: border-box; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;" /&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;"&gt; /* Wait for the status to change */ &lt;/SPAN&gt;&lt;BR style="background-color: transparent; box-sizing: border-box; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;" /&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;"&gt; while (*stat == I2C_STATUS_BUSY) { &lt;/SPAN&gt;&lt;BR style="background-color: transparent; box-sizing: border-box; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;" /&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;"&gt; } &lt;/SPAN&gt;&lt;BR style="background-color: transparent; box-sizing: border-box; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;" /&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;"&gt;--- &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;"&gt;I didn't see I2C_STATUS_DONE which will be set in the function "I2C0_IRQHandler" =&amp;gt; "Chip_I2C_MasterStateHandler" as my own understand. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Anyone could help me to review if anthing 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;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 11:16:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769244#M730</guid>
      <dc:creator>aresmarser</dc:creator>
      <dc:date>2018-03-19T11:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Question about i2cio module</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769245#M731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How did you get the log? It is not recommended using printf() in an interrupt based handler, cause it affects the timing. It would be better if you use an I2C analyzer to trace the data transaction.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Thu, 22 Mar 2018 07:05:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769245#M731</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2018-03-22T07:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Question about i2cio module</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769246#M732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I set "&lt;SPAN lang="zh-CN"&gt;Quickstart -&amp;gt; Quick Settings -&amp;gt; Set library/header type&lt;/SPAN&gt;&lt;SPAN lang="en-US"&gt; =&amp;gt; Redlib (semihost)&lt;/SPAN&gt;" to use standard printf function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. "&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #51626f; 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;"&gt;It is not recommended using printf() in an interrupt based handler&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;=&amp;gt; Is it ok if I use polling event handler "Chip_I2C_SetMasterEventHandler(I2C0, Chip_I2C_EventHandlerPolling)" instead of event handler interrupt based "Chip_I2C_SetMasterEventHandler(I2C0, Chip_I2C_EventHandler)"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. "&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #51626f; 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;"&gt;It would be better if you use an I2C analyzer to trace the data transaction.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;=&amp;gt; How to do that? Any user manual?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Arna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 07:51:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769246#M732</guid>
      <dc:creator>aresmarser</dc:creator>
      <dc:date>2018-03-22T07:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Question about i2cio module</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769247#M733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the misunderstanding, what I mean is Printf() is not recommended using in an ISR, but ok if you put it in Chip_I2C_EventHandlerPolling() or Chip_I2C_EventHandler(). and from the log, the I2C seems work well as the state changing shows it starts from I2C_EVENT_LOCK to I2C_EVENT_UNLOCK, it means the master transfer is complete, so it should no be stuck in the while loop, the reason why you didn't see &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Arial, sans-serif; font-size: 13.33px; 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;"&gt;I2C_STATUS_DONE &lt;/SPAN&gt;is due to this state is only set in Chip_I2C_MasterStateHandler(), which is called in Chip_I2C_EventHandlerPolling(), not Chip_I2C_EventHandler().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The I2C analyzer is just a logic analyzer for I2C protocol. something like &lt;A class="link-titled" href="https://www.totalphase.com/products/beagle-i2cspi/" title="https://www.totalphase.com/products/beagle-i2cspi/"&gt;Beagle I2C/SPI Protocol Analyzer - Total Phase&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Fri, 23 Mar 2018 03:09:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769247#M733</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2018-03-23T03:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Question about i2cio module</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769248#M734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #51626f; 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;"&gt;Kan&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for more comment.&lt;/P&gt;&lt;P&gt;It makes me more clear to undstand the whole thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As my understanding,&lt;/P&gt;&lt;P&gt;Once the master transfer done, the status shoud be set as "I2C_STATUS_DONE". Am I right?&lt;/P&gt;&lt;P&gt;And I see it would happen in two cases as below:&lt;/P&gt;&lt;P&gt;1.&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;-# Interrupt based handling makes use of #Chip_I2C_EventHandler handler.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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;I2C0_IRQHandler =&amp;gt; Chip_I2C_MasterStateHandler =&amp;gt; handleMasterXferState =&amp;gt; change "xfer-&amp;gt;status" to “I2C_STATUS_DONE” once&amp;nbsp;master&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; transfer done&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. -# Polling based handling makes use of #Chip_I2C_EventHandlerPolling handler.&lt;/P&gt;&lt;P&gt;Chip_I2C_EventHandlerPolling =&amp;gt;&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; &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_MasterStateHandler =&amp;gt; &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;handleMasterXferState =&amp;gt; change "&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;xfer-&amp;gt;status" to “I2C_STATUS_DONE” once&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;master&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; transfer done.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it right?&lt;/P&gt;&lt;P&gt;And if the&amp;nbsp;stat is always&amp;nbsp;I2C_STATUS_BUSY, the while condition is always met and the function is never return.&lt;/P&gt;&lt;P&gt;So I am confused why the&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;stat &lt;/SPAN&gt;was not changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;DIV&gt;/* Chip event handler interrupt based */&lt;BR /&gt;void Chip_I2C_EventHandler(I2C_ID_T id, I2C_EVENT_T event)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct i2c_interface *iic = &amp;amp;i2c[id];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; volatile I2C_STATUS_T *stat;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Only WAIT event needs to be handled */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (event != I2C_EVENT_WAIT) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stat = &amp;amp;iic-&amp;gt;mXfer-&amp;gt;status;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Wait for the status to change */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (*stat == I2C_STATUS_BUSY) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;/* Chip polling event handler */&lt;BR /&gt;void Chip_I2C_EventHandlerPolling(I2C_ID_T id, I2C_EVENT_T event)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct i2c_interface *iic = &amp;amp;i2c[id];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; volatile I2C_STATUS_T *stat;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Only WAIT event needs to be handled */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (event != I2C_EVENT_WAIT) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stat = &amp;amp;iic-&amp;gt;mXfer-&amp;gt;status;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Call the state change handler till xfer is done */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (*stat == I2C_STATUS_BUSY) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Chip_I2C_IsStateChanged(id)) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_I2C_MasterStateHandler(id);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;------&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Arna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 05:20:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769248#M734</guid>
      <dc:creator>aresmarser</dc:creator>
      <dc:date>2018-03-23T05:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Question about i2cio module</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769249#M735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, your understanding is right. &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;I2C_STATUS_DONE&lt;/SPAN&gt; is set in handleMasterXferState(), which is called in I2C0_IRQHandler() or Chip_I2C_EventHandlerPolling(), but what ever you used for the event handler, you may just set a breakpoint at the following line:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/522i35CCF682C3BACBD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;you may know if this state is set during your test, there is no printf() needed for that purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 06:11:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769249#M735</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2018-03-23T06:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Question about i2cio module</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769250#M736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to debug with breakpoints as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Chip_I2C_MasterStateHandler.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/13938i6D796CFDE4025B12/image-size/large?v=v2&amp;amp;px=999" role="button" title="Chip_I2C_MasterStateHandler.png" alt="Chip_I2C_MasterStateHandler.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Chip_I2C_MasterSend.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/13981i307364EAF9E20D81/image-size/large?v=v2&amp;amp;px=999" role="button" title="Chip_I2C_MasterSend.png" alt="Chip_I2C_MasterSend.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Chip_I2C_MasterRead.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14125i264F387DEE25829F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Chip_I2C_MasterRead.png" alt="Chip_I2C_MasterRead.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;P style="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; padding: 0px; margin: 0px;"&gt;And here is my test code snippet ------------&lt;/P&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; 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; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; overflow-x: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&amp;nbsp; uint8_t slaveAddr = 0x19;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; overflow-x: visible; position: static; padding: 0px; margin: 0px;" /&gt;&amp;nbsp; uint8_t regAddr = 0x20;&amp;nbsp; // 0x0F;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; overflow-x: visible; position: static; padding: 0px; margin: 0px;" /&gt;&amp;nbsp; uint8_t readData = 0;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; overflow-x: visible; position: static; padding: 0px; margin: 0px;" /&gt;&amp;nbsp; int result = 0;&lt;/DIV&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; 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; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; overflow-x: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt; &lt;/DIV&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; 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; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; overflow-x: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&amp;nbsp; Chip_I2C_MasterSend(I2C0, slaveAddr, &amp;amp;regAddr, 1);&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; overflow-x: visible; position: static; padding: 0px; margin: 0px;" /&gt;&amp;nbsp; result = Chip_I2C_MasterRead(I2C0, slaveAddr, &amp;amp;readData, 1);&lt;/DIV&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; 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; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; overflow-x: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;-------------------------------------------------------------------------------------&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;(1) For "&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; line-height: 25.95px; 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;"&gt;Chip_I2C_MasterSend&lt;/SPAN&gt;" procedure, "Chip_I2C_MasterStateHandler" hit the breakpoint and finally&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; line-height: 25.95px; 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;"&gt;"&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; line-height: 25.95px; 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;"&gt;Chip_I2C_MasterSend&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; line-height: 25.95px; 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;"&gt;" hit the breakpoint, that is, the operation was successful.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;(2) But for "Chip_I2C_MasterRead" procedure, both&amp;nbsp;"Chip_I2C_MasterStateHandler"&amp;nbsp; and&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; line-height: 25.95px; 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;"&gt;Chip_I2C_MasterRead&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; line-height: 25.95px; 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;"&gt;" never hit the breakpoints!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Here is the problem I met.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Any idea how I should debug to dig out the root cause?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;I have sufferred from this problem for several days.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Look forward to your support and help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Appreciated if you could help me more.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Many thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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; line-height: 25.95px; 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;"&gt;Arna&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2018 06:19:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769250#M736</guid>
      <dc:creator>aresmarser</dc:creator>
      <dc:date>2018-03-26T06:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Question about i2cio module</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769251#M737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To debug I2C, you'd better do with an I2C logic analyzer, or at least an oscilloscope to check if the waveform on I2C SCL and SDA lines is what you expected, and you may also check the data sheet of the I2C device you were handling, if the reading process is correct for that device.&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 06:55:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Question-about-i2cio-module/m-p/769251#M737</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2018-03-27T06:55:42Z</dc:date>
    </item>
  </channel>
</rss>

