<?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: I2C write after read with multi-byte addresses in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1484842#M192206</link>
    <description>&lt;P&gt;This bug is not present in I2C, for that reason I suggest you test your follower(slave) in the RT500 I2C bus.&lt;BR /&gt;RT500 I3C bus has some limitations regarding I2C mode; this restriction is when you when to use Multi-Master in I2C, and this is because the I3C use clock in push-pull, not open drain, this to support fast modes and fast most plus.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Multi-master in i2c requires clock-stretching. It works by using the open-drain clock and data so that a master can back off if another master is holding the clock low when it released it high (with some nasty timing issues to allow for the pullup to work).&lt;/P&gt;
&lt;P&gt;Is it possible to attach the communication scopes to have a better picture of how the communication is made?&lt;/P&gt;
&lt;P&gt;If you have more questions do not hesitate to ask me.&lt;BR /&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jul 2022 19:01:37 GMT</pubDate>
    <dc:creator>Omar_Anguiano</dc:creator>
    <dc:date>2022-07-05T19:01:37Z</dc:date>
    <item>
      <title>I2C write after read with multi-byte addresses</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1476135#M191610</link>
      <description>&lt;P&gt;I'm using RT595 evk to talk over I2C to a custom chip which has 4-byte register addresses. I'd chosen the I3C0 bus and decided to use the driver provided in the SDK. Specifically, the function that's doing the transaction is&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I3C_MasterTransferBlocking&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;which seems to do these steps in theory:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1. Start&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2. Setup for I2C write.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;3. Write subaddress (register address on the slave), which can be up to 4 bytes.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;4. Repeated start&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;5. Setup for I2C read.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;6. Read data.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;7. Stop&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, hooking up a logic analyzer, I'm seeing a different behavior on the I2C bus that is:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1. Start&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2. Setup for I2C write.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;3. Write only the Most significant byte of the subaddress.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;After this step, I'm not seeing the next significant byte, but the one after. My slave is not ACKing that and the bus enters a stuck state at that point.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Do you have any recommendations on this API or using a different one?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 17 Jun 2022 17:29:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1476135#M191610</guid>
      <dc:creator>nnik</dc:creator>
      <dc:date>2022-06-17T17:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: I2C write after read with multi-byte addresses</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1477710#M191763</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;Hope you are well. &lt;BR /&gt;Please set "subaddressSize" to 4 in the variable type i3c_master_transfer_t before calling I3C_MasterTransferBlocking().&lt;/P&gt;
&lt;P&gt;If you have more questions do not hesitate to ask me.&lt;BR /&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 23:17:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1477710#M191763</guid>
      <dc:creator>Omar_Anguiano</dc:creator>
      <dc:date>2022-06-21T23:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: I2C write after read with multi-byte addresses</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1478504#M191812</link>
      <description>&lt;P&gt;Thanks Omar. The behavior I mentioned is with the subAddressSize set to 4.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 20:32:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1478504#M191812</guid>
      <dc:creator>nnik</dc:creator>
      <dc:date>2022-06-22T20:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: I2C write after read with multi-byte addresses</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1479962#M191907</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Is this issue also present when using I2C bus from the RT500 side?&amp;nbsp; This test is to check if the issue is on the I3C bus or in the follower(slave) device.&lt;BR /&gt;It will be helpful to check if the problem persists by calling I3C_MasterTransferNonBlocking().&lt;/P&gt;
&lt;P&gt;If you have more questions do not hesitate to ask me.&lt;BR /&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 18:25:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1479962#M191907</guid>
      <dc:creator>Omar_Anguiano</dc:creator>
      <dc:date>2022-06-24T18:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: I2C write after read with multi-byte addresses</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1479964#M191908</link>
      <description>&lt;P&gt;Hey Omar,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Not sure what you meant by this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this issue also present when using I2C bus from the RT500 side?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From the scope shots, it looks like an issue on the master side- Out of the 4 byte sub address. Using an example 0x06040270, I was only seeing the intermittent bytes 06 and 02 on the bus. The slave was ACKing 06, but it didn't ack 02- which is likely a different problem on the slave.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One thing which I tried was to write a single byte at a time to the registers&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MWDATAH and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MWDATAHE instead of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MWDATAB and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MWDATABE respectively. This seems to work, but it's not reliable, and I don't think it's supposed to work. I also tried writing 2 bytes at a time to the same MWDATAH+ registers, which didn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It seems like the I3C_MasterTransferBlocking is doing the right thing up until writing to the FIFO. I'll try&amp;nbsp;I3C_MasterTransferNonBlocking as well.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 18:43:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1479964#M191908</guid>
      <dc:creator>nnik</dc:creator>
      <dc:date>2022-06-24T18:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: I2C write after read with multi-byte addresses</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1479976#M191909</link>
      <description>&lt;P&gt;Adding a note that I'm observing the same behavior with&amp;nbsp;&lt;SPAN&gt;I3C_MasterTransferNonBlocking.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 20:16:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1479976#M191909</guid>
      <dc:creator>nnik</dc:creator>
      <dc:date>2022-06-24T20:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: I2C write after read with multi-byte addresses</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1484842#M192206</link>
      <description>&lt;P&gt;This bug is not present in I2C, for that reason I suggest you test your follower(slave) in the RT500 I2C bus.&lt;BR /&gt;RT500 I3C bus has some limitations regarding I2C mode; this restriction is when you when to use Multi-Master in I2C, and this is because the I3C use clock in push-pull, not open drain, this to support fast modes and fast most plus.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Multi-master in i2c requires clock-stretching. It works by using the open-drain clock and data so that a master can back off if another master is holding the clock low when it released it high (with some nasty timing issues to allow for the pullup to work).&lt;/P&gt;
&lt;P&gt;Is it possible to attach the communication scopes to have a better picture of how the communication is made?&lt;/P&gt;
&lt;P&gt;If you have more questions do not hesitate to ask me.&lt;BR /&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 19:01:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I2C-write-after-read-with-multi-byte-addresses/m-p/1484842#M192206</guid>
      <dc:creator>Omar_Anguiano</dc:creator>
      <dc:date>2022-07-05T19:01:37Z</dc:date>
    </item>
  </channel>
</rss>

