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.

CCS/OPT8320: OPT8320 Time of flight sensor

Part Number: OPT8320

Tool/software: Code Composer Studio

Hi,
We are using opt8320 ToF sensor . We collected the output data using stm32f446, but the datas are missing . The output interface clock is set at 3MHz but it doesn't seems to be correct . The waveform obtained for HD (channel 0), OPCLK (channel 1) and a GPIO pin ( made high before collecting data and made low after receiving (channel 2) ) is attached below . Please help us to find why the waveform of OPCLK shows these irregularity .


void opt8320_init()
{

reset_enable();
delay(1000);
reset_disable();


I2C3_WriteInt(0x80, 0x000001); // TG_EN = 1
I2C3_WriteInt(0x08, 0x000000); // STANDBY = 0
I2C3_WriteInt(0x80, 0x000000); // TG_EN = 0
I2C3_WriteInt(0x12, 0x00000A); // INIT_0 = 0Ah
I2C3_WriteInt(0x1B, 0x00000A); // INIT_1 = 0Ah
I2C3_WriteInt(0x0B, 0x002000); // INIT_2 = 01h
I2C3_WriteInt(0x81, 0x000081); // UPDATE_SEL = 00h+slave mode

/* timing parameter */

I2C3_WriteInt(0x5C, 0x340000); // INTG_DUTY_CYCLE = 13 , 20%
temp1 = I2C3_ReadShort(0x50);

I2C3_WriteInt(0x5B, 0xE00000); // ILLUM_EN_EARLY = 1 
I2C3_WriteInt(0x0E, 0x016000); // ILLUM_DC_CORR_DIR = 0, ILLUM_DC_CORR = 0B 
I2C3_WriteInt(0xDE, 0x000600); // OP_CLK_FREQ = 3 MHz 
I2C3_WriteInt(0x80, 0x000001); // TG_EN = 1 
}