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.

DM355 / I2C16 bit adress and MT9J003 sensors

Hi ,

 

  I got a problem to connect the DM355 ( EVM ) with a MT9J003 sensors that uses 16 bit for the adress on the i2C . there is a desciption how to handle it , but it doesn t work and there is no communication between the both . With a 8 bit capteur , there is no problem ...

 

can you help me ? thakns in advance

 

mickael

 

  • Hi Mickael,

    Please check this post, http://e2e.ti.com/support/embedded/f/354/p/52818/200119.aspx#200119 .

    Hope it might help to resolve your problems.

    Thanks,

    Tai Nguyen

  • no , the problem is not resolved , so ...

  • Are you saying that you are still not able to make the DM355 to communicate with the MT9J003 sensor or something else?

    Thanks,

    Tai

  • Hi ,

     

      yes  , it is the "same problem" . and they are still not able to make the communication ...

    it is not a problem with the level of IO ( 1,8V or 3,3V ). there is level shifter on the board.

     

    thanks for your help

     

     

     

     

     

  • I am not sure where they are in the debug process. In the other post, it indicates that this sensor has a 16-bit address registers. So the data are 2 byte long.

    Were they able to get the ACK out of the sensor when the DM355 tries to establish the communication with the sensor? If not they need to figure out why? They need to monitor the I2C bus to see if the clock and data (address, ACK, ...) are correct. If the sensor does not ackowledge then the address sent out from the DM355 is wrong.

    Thanks,

    Tai

  • Dear Tai,

    Thanks Mickael for posting this on the forum.

    Here is the status of the dev :

    - The sensor we are using is using 16-bit address registers.

    - The MT9J003 datasheet declares an I2C slave address of 0x6C (8-bit) that we converted to the DM355 slave address format 0x36 (7-bit), using this I2C slave address returns us a Major when we register the driver with register_chrdev.

    - We cannot manage to get and ACK from the sensor at all.

    We are using Arago sources for this project, and are using the standard SMBUS functions to communicate with the sensor.

    A few questions :

    - Can we use the SMBUS functions directly to communicate with the sensor or do we need to deeply modify them ?

    - Does the DM355 support 16-bit address registers  as described bellow :

    --------------------------------------------------

    I2C Block Read (2 Comm bytes)
    ============================
    This command reads a block of bytes from a device, from a designated register that is specified through the two Comm bytes.
    S Addr Wr [A] Comm1 [A] Comm2 [A] S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P
    --------------------------------------------------

    Thank you very much for your time and support.

    Kind regards,
    Richard
  • Hi Richard,

    I think you should leave the MT9J003 address as is (0x6c) and let the DM355 sends it out. I think because of the wrong slave address you cannot get the ACK from the sensor.

    I have not used the SMBUS to communicate with the I2C on TI devices so I cannot comment much here. 

    The DM355 I2C should support any number of byte address registers, you would treat the number of address byte just as the number of data byte as you read or write.

    It is important to get the first ACK here:      S Addr Wr [A]

    If the address is correct but you still don't get the ACK then you could check to see if the sensor is not ready to communicate with the master I2C.

    Thanks and regards,

    Tai

     

  • Hi Tai,

    Just gave it a try with 0x6c and still the same issue, not having the ACK back :(

    Any tentative to read or write on the I2C just simply returns a random value 0xFFFFFF87..

    Here is a copy from the sensor datasheet :

    -------------------------
    Bits [7:1] of this byte represent the device slave address and bit [0] indicates the data transfer direction. A “0” in bit [0] indicates a WRITE, and a “1” indicates a READ. The default slave addresses used by the MT9J003 for the MIPI configured sensor are 0x6C (write address) and 0x6D (read address) in accordance with the MIPI specification.
    -------------------------

    And the I2C specs from TI says :

    -------------------------
    In the 7-bit addressing format (Figure 8), the first byte after a START condition (S) consists of a 7-bit slave address followed by a R/W bit. The R/W bit determines the direction of the data.
    R/W = 0: The master writes (transmits) data to the addressed slave.
    R/W = 1: The master reads (receives) data from the slave.
    -------------------------

    That's the reason why we did the shift from 8 to 7 bit.

    SMBUS does not seem to allow 16bit register address, what would you recommend to communicate with the I2C on TI devices ?


    Thanks again

    Regards,
    Richard

     

  • Dear Tai,

     

    We finally managed to get a first ACK from the sensor :) The address provided by the datasheet was not correct and a quick bus scan gave us the correct address back.

    You mentionned that you were not using the SMBUS for I2C communication, what do you use then ?

     

    Thanks a lot

    Richard

  • Dear Richard,

    I am sure you are not very happy to learn that the address provided by the datasheet is incorrect. You did not have to shift the value, did you?

    For TI I2C modules, you should just use the I2C bus protocol and that what I use.

    Thanks,

    Tai Nguyen

  • Mickael,

        We need the datasheet of mt9j003. Can you help me? Thanks in advance.

    Maojun

  • Hello! Can you help me? I need the datasheet of mt9j003 too. Can you send it to my mail -> sasha8702@mail.ru

     

    Thanks for help.