<?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>S32KのトピックRe: flexio_i2c length overflow issue</title>
    <link>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691671#M1213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;32个赞&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Aug 2017 03:40:04 GMT</pubDate>
    <dc:creator>zzqq</dc:creator>
    <dc:date>2017-08-07T03:40:04Z</dc:date>
    <item>
      <title>flexio_i2c length overflow issue</title>
      <link>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691667#M1209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I use flexio_iic to read the eeprom. and&amp;nbsp; I found a issue when the reading length is over 13 using flexio_i2c.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I traced the code. i found there's a overflow in function &amp;lt;FLEXIO_I2C_DRV_MasterSetBytesNo&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static void FLEXIO_I2C_DRV_MasterSetBytesNo(FLEXIO_Type *baseAddr, const flexio_i2c_master_state_t *master)&lt;BR /&gt;{&lt;BR /&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint16_t timerCmp;&lt;BR /&gt;&amp;nbsp;2 &amp;nbsp;&amp;nbsp; uint32_t bytesNo;&lt;BR /&gt;&amp;nbsp;3 &amp;nbsp;&amp;nbsp; uint8_t resourceIndex;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Index of first used internal resource instance (shifter and timer) */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;4 &amp;nbsp;&amp;nbsp; resourceIndex = master-&amp;gt;flexioCommon.resourceIndex;&lt;BR /&gt;&amp;nbsp;5 &amp;nbsp;&amp;nbsp; /* Compute number of SCL ticks, including address */&lt;BR /&gt;&amp;nbsp;6 &amp;nbsp;&amp;nbsp; bytesNo = master-&amp;gt;txRemainingBytes;&lt;BR /&gt;&amp;nbsp;7 &amp;nbsp;&amp;nbsp; bytesNo = (bytesNo * 18U) + 1U;&lt;BR /&gt;&amp;nbsp;8 &amp;nbsp;&amp;nbsp; /* Set number of ticks in low part of timer compare register */&lt;BR /&gt;&amp;nbsp;9 &amp;nbsp;&amp;nbsp; timerCmp = FLEXIO_HAL_GetTimerCompare(baseAddr, SCL_TIMER(resourceIndex));&lt;BR /&gt;&amp;nbsp;10 &amp;nbsp; timerCmp = (uint16_t)((timerCmp &amp;amp; 0x00FFU) | (uint16_t)((bytesNo &amp;amp; 0xFFU) &amp;lt;&amp;lt; 8U));&lt;BR /&gt;&amp;nbsp; 11&amp;nbsp; FLEXIO_HAL_SetTimerCompare(baseAddr, SCL_TIMER(resourceIndex), timerCmp);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; According to the reading length 14, the master-&amp;gt;txRemainingBytes is 15 and&amp;nbsp; we can calculate the final bytesNo 0x10f(271).But after excute the line 10, we can see the higher 8 bits of bytesNo is ignored.And it leads to a error execution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So how can i read bytes over 13?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 02:21:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691667#M1209</guid>
      <dc:creator>cheney</dc:creator>
      <dc:date>2017-08-03T02:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: flexio_i2c length overflow issue</title>
      <link>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691668#M1210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a known limitation of FlexIO I2C driver, it cannot handle transfers larger than 13 bytes.&lt;/P&gt;&lt;P&gt;In order to transfer data larger than 13 bytes you can perform multiple transfers with data size &amp;lt;= 13 in order to send/receive the desired amount of payload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are constraints of the slave device that restricts the transfer to be performed only once with the whole data you can use the LPI2C driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rares&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 07:30:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691668#M1210</guid>
      <dc:creator>raresvasile</dc:creator>
      <dc:date>2017-08-03T07:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: flexio_i2c length overflow issue</title>
      <link>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691669#M1211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get it.&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 07:34:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691669#M1211</guid>
      <dc:creator>cheney</dc:creator>
      <dc:date>2017-08-03T07:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: flexio_i2c length overflow issue</title>
      <link>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691670#M1212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;32个赞&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 03:34:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691670#M1212</guid>
      <dc:creator>zzqq</dc:creator>
      <dc:date>2017-08-07T03:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: flexio_i2c length overflow issue</title>
      <link>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691671#M1213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;32个赞&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 03:40:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/flexio-i2c-length-overflow-issue/m-p/691671#M1213</guid>
      <dc:creator>zzqq</dc:creator>
      <dc:date>2017-08-07T03:40:04Z</dc:date>
    </item>
  </channel>
</rss>

