Hello engineers , im tryna test i2c with bmi270 to get the chip_id response . When read datasheet from Bosch it said that read_reg(0x00) to receive chip_id, so when testing in Logic analyzer can see that data 0x00 write to address 0x68 , then perform read at address 0x68 . But when debug with bmi270 cannot get the feed back chip_id. im using sda scl pull down.. Wonder if anyone has exprerience with this can check where's the problem , thanks a lot
volatile uint8_t chip_id = 0 ;
...
main(){
// Flexio_I2c_Ip_MasterSendData(0U, FLEXIO_I2C_CHANNEL_0, ®, ONE_BYTE_SIZE, FALSE);
/* Wait master transfer to finish */
//while (((Flexio_I2c_Ip_MasterGetStatus(0U, FLEXIO_I2C_CHANNEL_0, NULL_PTR)) == FLEXIO_I2C_IP_BUSY_STATUS) && (timeout > 0))
//{
// timeout--;
//}
Flexio_I2c_Ip_MasterSendDataBlocking(
0, /* Instance */
0, /* Channel */
®, /* Tx buffer */
1, /* Size */
FALSE, /* SendStop = FALSE (IMPORTANT!) */
100 /* Timeout ms */
);
/* Send asynchronously from the master a read request to the slave device */
// Flexio_I2c_Ip_MasterReceiveData(0U, FLEXIO_I2C_CHANNEL_0, rxBufferMaster, TRANSFER_SIZE, TRUE);
// Flexio_I2c_Ip_MasterReceiveData(0U, FLEXIO_I2C_CHANNEL_0, &chip_id, 1, TRUE);
Flexio_I2c_Ip_MasterReceiveDataBlocking(
0, /* Instance */
0, /* Channel */
&chip_id, /* Rx buffer */
1, /* Size */
TRUE, /* SendStop = TRUE */
100 /* Timeout ms */
);
