Hello,
I tried with the I2C master Apps, to read one register ( 8 bits9, with this code :
The protocol to read a register is described on this picture :
Attachment 2523
Do you se any mistakes on the code ?
Because I got nothing.
Thank you,
Nicolas
I tried with the I2C master Apps, to read one register ( 8 bits9, with this code :
Code:
int main(void)
{
DAVE_STATUS_t status;
uint8_t rx_data;
// Slave address 0x77
uint8_t registerD0 = 0xD0;
status = DAVE_Init(); /* Initialization of DAVE APPs */
while(1U)
{
I2C_MASTER_Transmit(&I2C_MASTER_0,true,0x77,®isterD0,1,false);
while(I2C_MASTER_IsTxBusy(&I2C_MASTER_0));
I2C_MASTER_Receive(&I2C_MASTER_0,true,0x77,&rx_data,1,true,true);
while(I2C_MASTER_IsRxBusy(&I2C_MASTER_0));
}
}
Attachment 2523
Do you se any mistakes on the code ?
Because I got nothing.
Thank you,
Nicolas