2 Replies Latest reply on Apr 14, 2016 12:20 PM by james_1529561

    I2C after WDT interrupt

    james_1529561

      I'm attempting to interface with a set of I2C sensors (accelerometer/magnetometer & temperature/humidity) and for whatever reason I have not been able to get the I2C bus to work off of a watchdog interrupt. If I attempt to communicate with either of the sensors before the first WDT interrupt, there is no issue, but the core will lock up or reset afterwards.

         

      Everything else has generally worked within the ISR routine (ADC read, UART transfer) but the I2C hasn't. I've tried using the CriticalSection API, starting and restarting the I2C bus, disabling and re-enabling the WDT, and disabling sleep modes to no avail. Any insight into this issue would be appreciated. Thanks!

         

      I have some sample code attached that has a lot of unrelated functionality removed (UART, BLE, etc).