Issue: I2C_1 and I2C_2 peripherals do not work when using the I2C_Master_Sync or the I2C_Master_RTOS_Beta driver. I2C_0 do work for both these drivers. When the output of peripherals is viewed on an oscilloscope no activity can be seen on DATA or CLK, they are just sitting high at 3.3v. When I2C_0 is viewed correct IC2 coms can be seen.
Most investigation has been done using the I2C_Master_RTOS_Beta driver. On I2C_1 and I2C_2, when the data is written into the TWIHS_THR register the TXRDY register does not go high.
Status Register values for I2C_0 (working) and I2C_1 (not working) After a call to _i2c_m_async_write.
0x0000000c (I2C_0)
TXCOMP Transmission Completed = 0
RXRDY Receive Holding Register = 0
TXRDY Transmit Holding Register = 1
VREAD Slave Read = 1
SCL SCL Line Value = 0
SDA SDA Line Value = 0
0x03000008 (I2C_1)
TXCOMP Transmission Completed = 0
RXRDY Receive Holding Register = 0
TXRDY Transmit Holding Register = 0
VREAD Slave Read = 1
SCL SCL Line Value = 1
SDA SDA Line Value = 1
This results in the driver waiting for a semaphore indefinitely on I2C_1.
I have another project setup using the sync driver and this shows the same results on I2C_1 and I2C_2 with the driver constantly waiting for TXRDY or a NACK. I2C_0 is correctly reading temps from a sensor.
The datasheet says that TXRDY goes high when the data is transferred to the internal shifter, so is it possible this is not occurring?
I have looked at the PMC controller to check the correct peripheral clocks are enabled and as far as I can tell they are.
Any help would be much appreciated and I am happy to provide any more info.
Thanks.