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.

OPT3101: OPT3101. Problems programming memory register via I2C

Part Number: OPT3101

Hi, I need some help because I am a little lost. I developed a driver to control the OP3101 EVM board. The driver was working fine but now, I have designed a custom board with the OPT3101. The board is very simple and it shall work fine but here is the problem:

When I try to write some parameter via I2C, I am able to see on the oscilloscope the I2C frame with all the parameters (address, data and ACK) but then when i try to read the written value over the register always read the default value. 

Somebody knows why is it happen? Some issue related with this topic?

Thanks in advance.

  • Do you know if there is another version of this IC. Could be possible that a internal change has been done? Thanks in advance.

  • Hi,

    There is no internal change on the IC. Are you seeing this on multiple OPT3101 units or only one? You are communicating directly with the IC over I2C on the EVM (MSP on evm not used)? What other differences are there between the EVM and your custom board? Which register are you reading? I assume you are writing a value and reading back expecting to see the written value and instead seeing the default value?

    Best,

    Alex

  • Thanks Alex in advance. 

    The differences between my custom board and the EVM are few. Basically I have isolated the ToF sensor. The microcontroller is is another board. I attach the sck.

    I am trying to write a lot of registers: 89h, 6Eh, 80h.... but the result is always the same. I am pretty sure that electrically the board is working fine. It is a very strange failure. 

    I am thinking that maybe there is some new initialization sequence ( HW reset + firmware reset, i do not know). Now i wake up the IC via HW reset, waiting 2 ms with RST line at 0 volts and then put it to 5 V. Also, I wait 5 seconsd to start to send I2C commands.

    Regards.

  • Can you share a scope capture on the i2c lines close to the OPT3101 during this process?

    Best,

    Alex

  • Thanks in advance Alex. Here you can see three differents captures: the first is a reading frame, the second is a writting frame and the last is reading frame close up.

    As you can see the signal integrity is very good. 

  • Other thing that i forgot, sometimes when I am debugging my driver can see that some writtings are good. I have tried to insert some delays between writings but the result is the same. 

    Regards.

  • Thanks, will check this. Also can you confirm on my other question: Are you seeing this on multiple OPT3101 units or only one?

  • Hi Alex, we have ordered 5 units of this board to check it and all of them have the same issue. Could be a bad fabrication batch?  

  • Hi,

    I will send this to our quality team to get their thoughts and let you know. I also see in the i2c that there are some glitches on the data line. Are you sure these are not from the scope/setup related or from the master? 

    Also are you able to do a swap on the EVM board and solder the EVM IC to your board and put this failing unit on the EVM and check both? That would help in isolated problem to the device. Do you have any known good OPT3101 ICs you have previously been able to verify working in the setup?

    Best,

    Alex

  • Yes I see the glitches but i think that it shall not affect because there are on the falling edge of the clock signal. Also, I am able to control de EVM´s OPT3101 (after remove the MCU)  from my driver without any problem. 

    Actually, I can communicate with my board at 50 kHz but not at 100 kHz and 400 kHz. These is a problem if I want to use the EVM as a calibration driver because the EVM´s I2C driver is working at 400 kHz.

    I will try to change the OPT3101 IC and give you feedback. Firstly, I am going to try to use another I2C driver to see if the behaviour is the same.

    Regards.

     

  • Hi,

    To confirm, removing OPT3101 IC from the EVM board and putting on your board works but only at 50kHz and not 100kHz or 400kHz? What is the issue at these higher speeds?

    Best,

    Alex

  • Thanks Alex, i am going to change the IC during today. I will inform you with the results. As news I can tell you that i have tried another PCB and now all is working fine. I think my suspicions were true and there is some problem with some ICs. 

    Thanks in advance.

  • I have good news Alex. I have located the origin of the issue. My I2C_M is floating and I needed to set FORCE_EN_SLAVE = 1 . The EVM has the external temp sensor connected to this bus and for that reason my driver was working fine. 

    I do not know why there is a board that with FORCE_EN_SLAVE = 0 is able to write the memory..... Thanks for the help Alex.