I am trying to initialize the I2C module on the iMX53. When I write to the slave address register or the clock divider register of the I2C, the CPU resets. Other registers such as GPIO, UART,.. don't have this issue.
Is there something I am missing??
Mohammed, please click Correct Answer/Helpful Answer if your question had been answered.
Thanks,
Yixing
Hi,
In Linux you should have your I2C slave register in the proper i2c_board_info structure in order to send and receive any data from the i2c slave device.
First check in which i2c bus is your device and ensure is register or included in the proper structure which are in your board file (arch/arm/mach-mx5/board-mx53xxxx.c).
Also verify the address and the platform data to be passed to the probe function.
After verify that you could use the i2c_smbus* functions you could take a look in the adv7180 driver.
(drivers/media/video/mxc/capture/adv7180).
Clock of the i2c master module should be changed to another clock source then modify the divider. Then changed again to the i2c. Slaves devices in the i2c bus have his own clock if they use and use his i2c address to modify his clock rate.
Regards,
-Israel.