I use flexio act I2C to read a temperature sensor, but the transfer always fail.
The status is STATUS_I2C_TX_UNDERRUN.
From LA i see the slave address was transferred twice. You can see the screenshot that from LA as below
It cause transfer length from 4 bytes become 5 bytes, therefore a NAK is responded by slave after last data transfer.
The code flow is as below.
FLEXIO_DRV_DeinitDevice -> FLEXIO_DRV_InitDevice -> FLEXIO_I2C_DRV_MasterDeinit ->FLEXIO_I2C_DRV_MasterInit -> FLEXIO_I2C_DRV_MasterSendData
The related environment :
1. Platform : s32k116 develop board
2. SDK : S32SDK_S32K116_EAR_1.8.7
3. Flexpin : PTA1(SDA), PTA0(SCL)
4. I2C speed : 400K
5. FLEXIO0_CLK : 40M(CLK_SRC_SOSC_DIV2)
Does anything i am missing or what has cause this?