You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am working with a MAX32655 custom board with 2 I2C devices on the same bus (I2C1). The devices are ADXL343 and MAX31328. After experimenting with the I2C example, I noticed that sometimes the driver would just hang after running for a while.
When trying using the sync function MXC_I2C_MasterTransaction, it would not return. When trying to use the async function MXC_I2C_MasterTransactionAsync or MXC_I2C_MasterTransactionDMA, the interrupt would never come.
Using a logic analyzer, it seems to be a state machine issue with the I2C driver, as sometimes the STOP condition would never happen or the MAX32655 would not send an ACK.
As my board is based on the MAX32655FTHR, I tried to reproduce the issue with the 2 I2C components on the board (the Audio Codec and the PMIC). The main code below, when compiled for the Feather board, hangs. However, if you uncomment lines 124 and 149 (thus printing to the console), then it works.
I could not find a similar issue here with the I2C driver. Have you seen this problem before?
I am not sure that the fix merged in pull request #1263 fixed the issue. I have been meaning to reopen the issue, but I haven't had time to set up a reproducible test case.
I am still/also seeing infinite loops when calling MXC_I2C_RevA_MasterTransaction(), but it moved to a different while loop.
Before the fix in pull request #1263 I saw it hang here:
while (!(i2c->intfl0&MXC_F_I2C_REVA_INTFL0_DONE)) {}
The temporary hack my team has been doing is to replace line 997 in i2c_reva.c with this line:
while (!(i2c->intfl0&MXC_F_I2C_REVA_INTFL0_STOP)) {}
This brings the behavior back to pre-commit 79c0d9a.
I am not sure if we're doing the perfect thing, but I just thought I'd mention that there is a closed issue describing the same thing, and I don't think the fix committed actually fixed it.
Yes, I saw the issue and the pull request, I thought this was going to solve it, but as you said, this moved to a different loop, so I don't think it solved the problem.
Hi,
I am working with a MAX32655 custom board with 2 I2C devices on the same bus (I2C1). The devices are ADXL343 and MAX31328. After experimenting with the I2C example, I noticed that sometimes the driver would just hang after running for a while.
When trying using the sync function
MXC_I2C_MasterTransaction
, it would not return. When trying to use the async functionMXC_I2C_MasterTransactionAsync
orMXC_I2C_MasterTransactionDMA
, the interrupt would never come.Using a logic analyzer, it seems to be a state machine issue with the I2C driver, as sometimes the STOP condition would never happen or the MAX32655 would not send an ACK.
As my board is based on the MAX32655FTHR, I tried to reproduce the issue with the 2 I2C components on the board (the Audio Codec and the PMIC). The main code below, when compiled for the Feather board, hangs. However, if you uncomment lines 124 and 149 (thus printing to the console), then it works.
I could not find a similar issue here with the I2C driver. Have you seen this problem before?
Thank you!
The text was updated successfully, but these errors were encountered: