I2C error codes F767ZI
- August 5, 2023
- 1 reply
- 3273 views
I am working to get one F767ZI board (master) to send 1 byte to a second F767ZI (slave). I'm using 4k external pull-up resistors on SDA and SCL. I am trapping errors in the master and they are:
After the following code on the master I get "Error 32".
ret = HAL_I2C_IsDeviceReady(&hi2c1, 30,1, 1000);
if ( ret != HAL_OK) {
uint32_t error_code = HAL_I2C_GetError(&hi2c1);
printf("Error %d\r\n", error_code);
}
Then, after the following code on the master I get "Error 4".
ret = HAL_I2C_Master_Transmit(&hi2c1, 30, TX_Buffer, 1, 1000); //up to 1 second to try and send
if ( ret != HAL_OK) {
uint32_t error_code = HAL_I2C_GetError(&hi2c1);
printf("Error %d\r\n", error_code);
}
Since this is my first time ever trying I2C, I'm sure I'm addressing something wrong or some other simple error.
I can't find anything in the HAL/LL reference to tell me what those error codes mean.
thank you, russ
p.s. My master F767 spits printf statements to UART4 so I can watch it. My slave F767 spits them to the terminal window in Ozone using SEGGER_RTT.
