Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(PeriphDrivers): I2C REVA Inifnite Loop #1263

Merged
merged 2 commits into from
Nov 11, 2024
Merged

fix(PeriphDrivers): I2C REVA Inifnite Loop #1263

merged 2 commits into from
Nov 11, 2024

Conversation

EricB-ADI
Copy link
Contributor

@EricB-ADI EricB-ADI commented Nov 11, 2024

Description

Fixed issues in MXC_I2C_RevA_MasterTransaction where after stop condition sent, the code spun on the stop condition send bit being cleared. The MSTRCTRL stop bit is cleared when the stop condition has started, we spin while that bit is 0, therefore we always spin since it clears instantly, or at least faster than the processor can read it.

The original interrupt flag check is wrong too, since it detects when a stop condition occurs. The correct logic is to wait on the send bit until hardware clears it for us. This most likely previously worked because of this line
i2c->intfl0 = MXC_F_I2C_REVA_INTFL0_DONE;. Meaning although "safer" we probably don't need to wait for the stop condition to be sent.

Address #1261

@sihyung-maxim sihyung-maxim merged commit da894c7 into main Nov 11, 2024
18 checks passed
@sihyung-maxim sihyung-maxim deleted the fix/i2c_reva branch November 11, 2024 19:45
sihyung-maxim pushed a commit to analogdevicesinc/hal_adi that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants