cancel
Showing results for 
Search instead for 
Did you mean: 

I2C error

syu1
Associate

MCU:STM32F446RCT6

Accessing an I2C device from the MCU may cause an I2C access error.

It looks like the last bit of data is missing from the MCU.

As a result, access that prevents the device from returning an ACK stops halfway.

Attached image "I2C_OK_NG.png"

Write 0x85 to subaddress 0x01 of device address 0x3E.

Read from sub address 0x01 of device address 0x3E.

Upper row: OK timing

Lower row: NG timing <-read error

It occurs for both reading and writing.

HAL_StatusTypeDef l_eResult = HAL_I2C_Master_Transmit(&hi2c1, in_ucSlaveAddress, l_pucData, (in_ulSize + 1), TIME_TIMEOUT_I2C);

HAL_StatusTypeDef l_eResult = HAL_I2C_Mem_Read(&hi2c1, in_ucSlaveAddress, in_ucSubAddress, I2C_MEMADD_SIZE_8BIT, out_pucData, in_ulSize, TIME_TIMEOUT_I2C);

Please tell me if there is a measure or a place you can check.

0 REPLIES 0