Part Number: MSP432E401Y
Tool/software:
Issue:
We have tried shoring the I2C channel4 CLK to GND to replicate the scenario where the I2C communication link is broken between the MCU and Slave. Upon testing the scenario, we have observed that, once the CLK is shorted to GND, the MCU controller stops running as it is entering possibly into the exception handler state (HardFaultHandler). We also have an I2C Communication recovery mechanism implemented to bring the communication up if it is failed during runtime, which also seems not working in this issue scenario.
Analysis:
As part of the issue analysis, we have tried the below steps:
Once the failure condition is induced and the I2C communication enters failed state (by shorting the I2C CLK to GND), as part of the recovery mechanism, we have tried the below to analyze and fix the issue:
- Cancelling ongoing I2C transaction before performing the recovery mechanism by using the driver function call (I2C_cancel).
- Replaced the “I2C_transfer” function call with “I2C_transferTimeout” with a timeout of 100ms to avoid indefinite hold of the I2C Channel
- Once the I2C communication is failed, added driver calls to Disable, Reset and Enable the I2C driver before entering the recovery sequence using
- MAP_SysCtlPeripheralDisable(SYSCTL_PERIPH_I2C4);
- MAP_SysCtlPeripheralReset(SYSCTL_PERIPH_I2C4);
- MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C4);
- Also, we have tried re-initializing the I2C driver post recovery sequence, and then re-configuring the I2C channel accordingly
- However, the behaviour of the controller remained same, as the controller had entered the exception handler and SW stopped running/entered into WdG reset scenario in all the above scenarios.
Support Required:
In this case will need necessary support in understanding why the controller is entering into the Hard Fault exception handler upon making the driver calls in the above-mentioned error scenario.