Hi Samuel,
I have test it on our FRDM-KL27 board, the chip is MKL27Z64VLH4, this chip has no PTE18,PTE19, so I use PTB0,PTB1 as the I2C0 pin.
My test code is the KSDK2.0_FRDM-KL27, after I use the UART ROM bootloader, my I2C0 still works ok on my side.
I don't know how did you initialize your I2C0 in your application code.
Please disable the I2C0 module at first, then enable it again, this is the I2C initialization code for your reference:
void I2C_MasterInit(I2C_Type *base, const i2c_master_config_t *masterConfig, uint32_t srcClock_Hz)
{
assert(masterConfig && srcClock_Hz);
/* Temporary register for filter read. */
uint8_t fltReg;
#if defined(FSL_FEATURE_I2C_HAS_HIGH_DRIVE_SELECTION) && FSL_FEATURE_I2C_HAS_HIGH_DRIVE_SELECTION
uint8_t c2Reg;
#endif
/* Enable I2C clock. */
CLOCK_EnableClock(s_i2cClocks[I2C_GetInstance(base)]);
/* Disable I2C prior to configuring it. */
base->C1 &= ~(I2C_C1_IICEN_MASK);
/* Clear all flags. */
I2C_MasterClearStatusFlags(base, kClearFlags);
/* Configure baud rate. */
I2C_MasterSetBaudRate(base, masterConfig->baudRate_Bps, srcClock_Hz);
#if defined(FSL_FEATURE_I2C_HAS_HIGH_DRIVE_SELECTION) && FSL_FEATURE_I2C_HAS_HIGH_DRIVE_SELECTION
/* Configure high drive feature. */
c2Reg = base->C2;
c2Reg &= ~(I2C_C2_HDRS_MASK);
c2Reg |= I2C_C2_HDRS(masterConfig->enableHighDrive);
base->C2 = c2Reg;
#endif
/* Read out the FLT register. */
fltReg = base->FLT;
#if defined(FSL_FEATURE_I2C_HAS_STOP_HOLD_OFF) && FSL_FEATURE_I2C_HAS_STOP_HOLD_OFF
/* Configure the stop / hold enable. */
fltReg &= ~(I2C_FLT_SHEN_MASK);
fltReg |= I2C_FLT_SHEN(masterConfig->enableStopHold);
#endif
/* Configure the glitch filter value. */
fltReg &= ~(I2C_FLT_FLT_MASK);
fltReg |= I2C_FLT_FLT(masterConfig->glitchFilterWidth);
/* Write the register value back to the filter register. */
base->FLT = fltReg;
/* Enable the I2C peripheral based on the configuration. */
base->C1 = I2C_C1_IICEN(masterConfig->enableMaster);
}
Please disable I2C prior to configure it, and try again on you side.
If you still have question, please let me know!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------