Question
HAL_I2C_GetError() reporting error codes
Hello,
We have noticed communication errors with STM32 that is working in our device. The device includes STM32 (master) and TI's battery monitor BQ76952 (slave).
Using the same device and same software we noticed three situations that occur randomly:
- After boot write commands are not returning any errors and further communication is correct.
- After boot few initial write commands are returning error and further communication is correct. However, we have noticed that some devices lost communication after longer perdiod (for example two months) and we don't know what is the reason for it. Only after rebooting STM32 communication is correct.
- Sometimes after boot few initial write commands are returning error and I2C peripheral locks up. In such a case all communication is failing. Only after rebooting STM32 communication is correct.
HAL_I2C_GetError() reports following error codes: 0x02 (ARLO), 0x04 (ACKF).
There are only two devices on I2C bus: stm32 (master), bq76952 (slave). I2C has 100 kHz clock. We're using HAL library for I2C communication.
It happens in two different configurations with STM32L432 and STM32G0B1.
It happens in two different configurations with STM32L432 and STM32G0B1.
Looking forward to your reply.
