2022-08-10 06:18 AM
Hello everyone,
I encountered a weird situation concerning I2C on a project at work. We are using an STM32H743XIH6.
We have an I2C device sending data, the I2C is setup with a DMA. Everything works fine until we have a physical disconnection of the I2C bus (i.e vibrations).
On some occurrences, it triggers a hard fault. Attaching to the program when the FW is stuck, we got the following:
By looking at the registers values above, the following bits are set for each registers:
itflags --> this is the I2C_ISR (0x18) register:
itsources --> this is the I2C_CR1 register:
From there, since the code gets stuck here, a HardFault is raised (below are the Fault registers):
CFSR:0x00000400
HFSR:0x40000000
DFSR:0x00000000
AFSR:0x00000000
MMFAR:0x00000000
BFAR:0x00000000
Is there anything we can do on the configuration ? I don't get why the Error Interrupt is not triggered or more simply, the error not handled.
Thanks for your enlightenment.
Best regards,
Marc
EDIT: I forgot to mention we tried with the version 1.3.0 and 1.9.0