IRNAS / environmental-module-firmware

Environmental Lora Murata type ABZ firmware on Arduino core
2 stars 3 forks source link

Device may stop responding via CAN after a few weeks #1

Open SloMusti opened 5 years ago

SloMusti commented 5 years ago

The issue appears to occur intermittently on some devices, currently observed on modules TOP1 and BOTTOM4, that after a few weeks of operation the device stops responding until a power cycle occurs. Nothing more is known at the moment.

SloMusti commented 5 years ago

Theories for why this may occur are the following:

SloMusti commented 5 years ago

Hardware watchdog test, given that an infinite loop trap is put in place: https://github.com/IRNAS/environmental-module-firmware/blob/master/env_firmware/env_firmware.ino#L74 to be able to determine if the CAN module fails to initialize. Given that the hardware watchdog is enabled prior to this, this loop is broken after 18 seconds as the timeout is defined and thus we can conclude the hardware watchdog works correctly and also the CAN module will keep trying to reinitialize until successful.

Test method:

  1. disconnect power
  2. short SCK line to GND to prevent SPI from working
  3. power the system up
  4. observe a quick flashing LED for 18s
  5. remove the SCK line to GND and the loop is existed with a successful boot

This is a desired strategy as the device in current use-case is nto performing any useful functions if CAN does not work.