Hello!
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
IIC_StartTransmission(SlaveID,MWSR);
i2c_Wait();
I2C0_D = u8RegisterAddress;
i2c_Wait(); // here is the problem i don't understand
I2C0_D = u8Data;
i2c_Wait();
i2c_Stop();
Pause();
}
Can anyone tell me what is wrong?
Thanks
Iulia