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
Thanks Omar. The behavior I mentioned is with the subAddressSize set to 4.
Hello
Is this issue also present when using I2C bus from the RT500 side? This test is to check if the issue is on the I3C bus or in the follower(slave) device.
It will be helpful to check if the problem persists by calling I3C_MasterTransferNonBlocking().
If you have more questions do not hesitate to ask me.
Best regards,
Omar
Hey Omar,
Not sure what you meant by this:
Is this issue also present when using I2C bus from the RT500 side?
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.
One thing which I tried was to write a single byte at a time to the registers MWDATAH and MWDATAHE instead of MWDATAB and 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.
It seems like the I3C_MasterTransferBlocking is doing the right thing up until writing to the FIFO. I'll try I3C_MasterTransferNonBlocking as well.
This bug is not present in I2C, for that reason I suggest you test your follower(slave) in the RT500 I2C bus.
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.
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).
Is it possible to attach the communication scopes to have a better picture of how the communication is made?
If you have more questions do not hesitate to ask me.
Best regards,
Omar
Adding a note that I'm observing the same behavior with I3C_MasterTransferNonBlocking.
Hello
Hope you are well.
Please set "subaddressSize" to 4 in the variable type i3c_master_transfer_t before calling I3C_MasterTransferBlocking().
If you have more questions do not hesitate to ask me.
Best regards,
Omar