Check MCUCSR for WDRF flag only and add TODO

This commit is contained in:
2024-09-20 23:44:42 +02:00
parent 10298a99c1
commit 208aadf3a3
2 changed files with 3 additions and 3 deletions

View File

@@ -74,8 +74,8 @@ bool WDT_HasTriggered(void)
// 7 6 5 4 3 2 1 0
// JTD ISC2 JTRF WDRF BORF EXTRF PORF
// Is power-on reset flag not set?
isreset = ((MCUCSR & BIT(0)) == 0);
// Is watchdog reset flag set?
isreset = ((MCUCSR & BIT(3)) == 1);
// XXX: Reset flag detection should be a separate
// module to handle the different types.

View File

@@ -10,13 +10,13 @@
// TODO: Make sure wear leveling resets memory correctly.
// TODO: Implement primary state machine for update loop.
// TODO: Migrate to ATMega 1284P-PU for 2nd 16-bit timer.
// TODO: Keep persistent TEMP and DEWP targets in EEPROM.
// TODO: Check thermistor conversion results /w thermometer.
// TODO: Implement optional CRC8 sensor measurement check.
// TODO: Use 18.432MHz quarz crystal, burn required fuses.
// TODO: Make sure nothing breaks with negative temperatures.
// TODO: Write an improved command parser (low priority).
// TODO: Proper error handling and recovery (after testing).
// TODO: Check why the MCUCSR EXTRF reset flag is set.
enum state_e
{