When using KDS2.0 + KSDK1.1.0 + PEx, fond something wrong when using the fsl_i2c component. The I2C master cannot get the ACK from slave.
The PE initial code don’t set the SCL,SDA pins to become open-drain. That is why the slave cannot pull the SDA low as a ACK.
have to add followings to set SCL,SDA as open-drain.
PORT_HAL_SetOpenDrainCmd(PORTB_BASE,2u,true);
PORT_HAL_SetOpenDrainCmd(PORTB_BASE,3u,true);
Attached is an I2C example which read the “who am I register(0x0D)” of the on-board sensor FXOS8700.
Cheers
Kent
Original Attachment has been moved to: k22_i2c_test.7z.zip