I try to use the I2C module to configure a CMOS sensor from a Kinetis K60N512 in an application but it gets stuck after the instruction I2C0_D = u8RegisterAddress; at i2c_Wait();.
It worked a few times, but now it's stopped. Here is my code:
void OV7675WriteRegister(unsigned char u8RegisterAddress, unsigned char u8Data)
// send data to slave
I2C0_D = u8RegisterAddress;
i2c_Wait(); // here is the problem i don't understand
I2C0_D = u8Data;
Can anyone tell me what is wrong?