Other Parts Discussed in Thread: AWR6843AOP, LP87702
Hello everyone,
Master AWR6843AOP
I am implementing I2C read with LP87702KRHBTQ1.
following in some code snippets:
/* Initializa the I2C driver */
I2C_init();
/* Initialize the I2C driver default parameters */
I2C_Params_init(&i2cParams);
i2cParams.transferMode = I2C_MODE_BLOCKING;
i2cParams.bitRate = I2C_400kHz;
/* Open the I2C driver */
i2cHandle = I2C_open(0, &i2cParams);
arg = 0; // 7bit address
errCode = I2C_control (i2cHandle, I2C_CMD_ADDR_MODE, (void* )&arg);
memset(&txData, 0, sizeof (txData));
memset(&rxData, 0, sizeof (rxData));
txData[0] = 0x01; // version register’s address in PMIC’s datasheet
i2cTransaction.slaveAddress = 0x60; // PMIC LP87702 address ID : 0x60
i2cTransaction.writeBuf = txData;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = rxData;
i2cTransaction.readCount = 1;
// Writing to slave and read what was sent by slave as well
retVal = I2C_transfer(i2cHandle, &i2cTransaction);
Uart_printf ("\r\nOTP_CODE = 0x%x",rxData[0]);
Here I am reading the value OTP_CODE = 0x8c
But as per the technical reference manual the value is different.
Could anyone tell me what I am missing here??
Thanks in advance..