Skip to content

Commit

Permalink
Fix I2C2 Pin errata bug, and use correct register check when controll…
Browse files Browse the repository at this point in the history
…er sends stop condition
  • Loading branch information
sihyung-maxim committed Oct 8, 2024
1 parent 378c06c commit 27c0447
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Libraries/PeriphDrivers/Source/I2C/i2c_me18.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ int MXC_I2C_Init(mxc_i2c_regs_t *i2c, int masterMode, unsigned int slaveAddr)
#endif
} else if (i2c == MXC_I2C2) {
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_I2C2);
#ifndef MAX32690GTK_PACKAGE_TQFN
MXC_GPIO_Config(&gpio_cfg_i2c2);
#endif
#ifndef MAX32690GTK_PACKAGE_TQFN
MXC_GPIO_Config(&gpio_cfg_i2c2c);
#endif
} else {
return E_NO_DEVICE;
}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/PeriphDrivers/Source/I2C/i2c_reva.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ int MXC_I2C_RevA_MasterTransaction(mxc_i2c_reva_req_t *req)
} else {
i2c->mstctrl |= MXC_F_I2C_REVA_MSTCTRL_STOP;

while (!(i2c->intfl0 & MXC_F_I2C_REVA_INTFL0_STOP)) {}
while (!(i2c->mstctrl & MXC_F_I2C_REVA_MSTCTRL_STOP)) {}
// Wait for Transaction to finish
}

Expand Down

0 comments on commit 27c0447

Please sign in to comment.