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.

AM62A7: About DCC3.0 VPAC3L cannot read and write sensor registers online

Part Number: AM62A7

Dear TI experts,

  The problem was raised in another thread, but that thread has now been resolved, so I propose a new thread. AM62A7: DCC cannot read the value of a register - Processors forum - Processors - TI E2E support forums

I modified the code to follow method 1 provided by Brandon. But it still didn't work. I set SLAVE_REG to the device address of sensor, leaving I2C_SLAVE unchanged. Besides, I made sure the I2C_BUS was set up correctly.

However, the sensor register still cannot be read and the error message shown below is printed. So I want to know what do SLAVE_REG and I2C_SLAVE stand for respectively?

Best regards,

Ding yi 

  

  • Hi Ding,

    Can you see if the camera is up on that bus using the following I2C command line utility:

    i2cdetect -r -y 2

    Best,

    Brandon

  • Hi Brandon,

      I am very sorry that I have to postpone the follow-up of this issue because I have been busy with other things recently.

      According to the method you mentioned last time, I checked the devices on I2C BUS 2 as shown below. 

      In addition, I noticed a strange phenomenon that when I set I2C_BUS to 2 and SLAVE_REG to 0x36, I get an Error in the i2cinit() function: Error: could not assign address 0x54. Then, after I set SLAVE_REG to 0x54, the i2cinit() function will not report any errors.  May I ask what the situation is?

      Then I continue to try to read the sensor register in the DCC software, but in the write() function, the return value is not equal to 2 and an error is reported. May I ask what does the return value not equal to 2 mean?

    Best,

      

  • Hi Ding,

    According to the image provided, it looks like 0x36 is being locked by some other process hence the error when trying to initialize i2c communication.0x54 is free to use and no error is shown when initializing i2c communication. 

    Line 266 simply writes the address to read to the camera so the subsequent read reads from that address. Here I am writing a 16 bit address. The write function will return the number of bytes written to the device, 2 bytes means the full address was written.

    Best,

    Brandon

  • Hi Brandon

    Do you mean that ioctl() failed because 0x36 was locked by some process when i2cinit()? If 0x36 is released at this point, will the problem be solved?

    Best,

  • Hi Ding, 

    Yes, although, have you confirmed that is the correct camera I2C address?

    Best,

    Brandon