This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I2C system test mode



I want to test the i2c module of OMAP4430.So i want to perform loop-back test.

I understand register configurations for loop-back mode,  as per datasheet they tell that DATA written to I2C_DATA register goes to tx FIFO buffer & then returns back to same register.So I want to know that if I write to i2c_DATA  register  & once it is transmitted after that is I2C_DATA register get reset for a while in loopback mode or not?

Reply me ASAP.

Thanks,

Ketan

  • Hi Ketan:

        Just to clarify, If I understood you well you want to know if  I2C_DATA registry is been reseted for the short period of time in between transmission and reception. Am I right?

    Regards,

    Rodrigo

  • Hi Rodrigo,

    Yes, I want to know if I2C_DATA register resetted for a short moment.

    Actually I want to perform I2C loopback test.So I want to know how to  perform loopback test for I2C.

    Thanks,

    Ketan 

  • Hi Ketan:

          You shouldn't be worried about knowing what would be the contains of I2C_DATA all the time you should be pooling I2Ci.I2C_STAT[4] XRDY instead or using its corresponding interrupt request.

          Every time you write on I2C_DATA a new byte added to TX FIFO and every time you read from I2C_DATA a byte is removed from the RX FIFO. So in loopback mode data write to I2C_DATA is received there too.

    you can take a look at next code:

    http://omapzoom.org/?p=kernel/omap.git;a=blob;f=drivers/i2c/busses/i2c-omap.c;h=be8ee2cac8bbe237c459fcd497cef8812acea728;hb=HEAD

    here is not performed loopback test, but you can see how normal operation is performed, initialization, data transmitted, data received and interrupt requests serviced, etc. And this will help you to implement loopback test.

    Regards,

    Rodrigo