sfuphantom / hercules-phantom-lib

A common firmware library for all Team Phantom PCBs based off of the TMS570LS1224/1227 Hercules line
0 stars 0 forks source link

Design and implement Power-On-Self-Test (POST) #3

Open rafguevara14 opened 1 year ago

rafguevara14 commented 1 year ago

A power on self test occurs on boot up to validate what happened before powering on. There are many reason an MCU may reset but for the VCU/BMS I think there is only one.

The watchdog timer resets the microcontroller if the firmware hangs. The boards have an external watchdog IC that should have a register we can read to determine if it has reset the microcontroller. We should read this as part of the POST. If the watchdog did reset the VCU, we should do...[insert requirements here]

Probably for another issue, but we need to have context surrounding a potential reset by saving some state to the internal EEPROM on the MCU and reading what caused the reset. If it's something unusual, we should immediately go to shutdown