I am getting intermittent hard faults down in driverlib i2c.c I2CMasterIntStatusEx,
where it's doing return(HWREG(ui32Base + I2C_O_MMIS));
In disassembly this is:
20018d84: 6940 LDR R0, [R0, #20]
R0 is 0x40020000, the register offset of 20 is right.
When this hard faults, my app has been running, happily chatting over I2C to my RTC chip, at least dozens of times.
What can cause a hard fault reading the I2C register?
Each time I do an I2C operation I am opening and closing the I2C peripheral, so I am certain that this read or write operation is
enlosed in:
I2C_IF_Open which does
MAP_PRCMPeripheralClkEnable(PRCM_I2CA0, PRCM_RUN_MODE_CLK);
MAP_PRCMPeripheralReset(PRCM_I2CA0);
and I2C_IF_Close which does:
MAP_PRCMPeripheralClkDisable(PRCM_I2CA0, PRCM_RUN_MODE_CLK);
What else besides preipheral clock off could cause a hard fault reading a peripheral register?