System reset following I2C issues

Wondering if anyone has experienced any I2C and/or system reset issues with DeviceOS 2.3.0 on an e-series module similar to the following:

We have three I2C devices on the same I2C bus: a GPIO expander (PCA9554), Temperature/Humidity sensor (MMA8653), and an external real-time clock (DS3231). This bus was occassionally hanging so some error checks were added to check the return value from Wire.endTransmission() calls in the driver code, which this unit was failing (status 1 is a busy timeout). If this case is detected, the Wire.reset() routine is being called to reset the bus, otherwise the problem would persist, even after pressing the “Reset” button. The logging system is being used to record any system and application warning or error messages to SD.

This call to Wire.reset() appears to work, at least for a time. Shortly after the “GPS TIMED OUT” log entry however, the system resets. The pattern then repeats several times over the next few hours.

Any hints or tips on what the problem might be or how to track it down would be greatly appreciated.

0000000020 [app] ERROR: Setting default Panel Type to NO PANEL
0000003129 [app] WARN: Particle.connect() time: 2022/5/4-19:34:48
0000004626 [comm.dtls] WARN: session has 0 uses
0000005298 [app] WARN: Update RTC from source = CELL: 2022/5/4-19:34:50
0000003228 [app] WARN: Particle.connect() time: 2022/5/4-19:36:27
0000003329 [app] ERROR: Wire.endTransmission failed with status 1
0000003530 [app] ERROR: Wire.endTransmission failed with status 1
0000003731 [app] ERROR: Wire.endTransmission failed with status 1
0000004109 [app] ERROR: Wire.endTransmission failed with status 1
0000004259 [app] ERROR: Failed to read temperature, resetting I2C bus
0000004555 [comm.dtls] WARN: session has 0 uses
0000005560 [app] WARN: Update RTC from source = CELL: 2022/5/4-19:36:30
0000003228 [app] WARN: Particle.connect() time: 2022/5/4-19:42:52
0000003329 [app] ERROR: Wire.endTransmission failed with status 1
0000003530 [app] ERROR: Wire.endTransmission failed with status 1
0000003731 [app] ERROR: Wire.endTransmission failed with status 1
0000004109 [app] ERROR: Wire.endTransmission failed with status 1
0000004259 [app] ERROR: Failed to read temperature, resetting I2C bus
0000004557 [comm.dtls] WARN: session has 0 uses
0000005553 [app] WARN: Update RTC from source = CELL: 2022/5/4-19:42:55
0000481413 [app] WARN: GPS TIMED OUT
0000481966 [app] WARN: Invalid GPS co-ordinates: lat = 0.000000, lng = 0.000000
0000584226 [app] WARN: Cannot send stop engine command to Controls Inc. Panel when NOT in Auto mode. Current mode = OFF
0000003129 [app] WARN: Particle.connect() time: 2022/5/4-19:58:16
0000004506 [comm.dtls] WARN: session has 0 uses
0000005176 [app] WARN: Update RTC from source = CELL: 2022/5/4-19:58:19
0000003228 [app] WARN: Particle.connect() time: 2022/5/4-20:0:41
0000003329 [app] ERROR: Wire.endTransmission failed with status 1
0000003530 [app] ERROR: Wire.endTransmission failed with status 1
0000003731 [app] ERROR: Wire.endTransmission failed with status 1
0000004109 [app] ERROR: Wire.endTransmission failed with status 1
0000004261 [app] ERROR: Failed to read temperature, resetting I2C bus
0000004566 [comm.dtls] WARN: session has 0 uses
0000005555 [app] WARN: Update RTC from source = CELL: 2022/5/4-20:0:44
0000003228 [app] WARN: Particle.connect() time: 2022/5/4-20:3:13

A couple of additional details: Test was run on 3 identical units running the same version of firmware and DeviceOS and only the one shown above was experiencing this issue. All units were configured to report on cell every 30 seconds and behaved well otherwise.

For the Wire.endTransmission() failures, this was traced to the PCA9554 driver which was issuing a restart, though it’s still not clear why this was a problem. Also, for the system reset, this turned out to be unrelated.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.