Now I have trouble r/w to MT9P031 image sensor.
Hardware is verified. Linux application can r/w to the sensor without any issue.
When the iss driver tries to write a word to the sensor, after the slave address is sent, there is huge delay, the SCL is streched low in that priod, which lasts about 5 seconds, before the payload is eventually put on the i2c bus.
I finally traced it down to Vps_i2cTransferMsgInt() function, it's stuck at Semaphore_pend(instObj->completionSem, i2cXferParams->timeout). however if I read i2c interrupt registers from Linux, the interrupt bits appear set(0x1410).
I tried polling mode, it has its own issue.
The only thing I changed from stock rdk3.2 is that MT9P031 sensor uses 8 bit register address,compared to AR0331's 16bit, so I changed Iss_deviceRead16/Iss_deviceWrite16 to reflect that.
How did you guys get the i2c to work? I have wasted two days on this stupid issue.