Solved
STM32CubeIDE HAL_I2C_ErrorCallback function does not work.
I'm using i2c interface to communicate with a eeprom memory, by dma.
It's working, however, when I put a wrong address to write in the memory (to test the errors), I get as return HAL_ERROR, but the function HAL_I2C_ErrorCallback (that i implemented) does not called.
How can I get a callback from this function in a error situation?
Part of my code is available below:
status = HAL_I2C_Mem_Write(&hi2c3, 0xB4, (0<<8), 2, dataWrite, 270, 1000); //Wrong Address
void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c){
HAL_UART_Transmit(&huart1, errorMsg, sizeof(errorMsg), 1000);
}