pintert3 / lc-sensor-evaluation-board

Low-Cost 18-sensor Wireless Sensor Device Code
MIT License
0 stars 0 forks source link

Watchdog timer interrupt not available in Atmega4809 #57

Open pintert3 opened 2 years ago

pintert3 commented 2 years ago

We might have to reimplement the function that used interrupt handlers with the enhanced watchdog timer of the Mega. The NanoEvery does not have the interrupt handler operation mode for it's watchdog timer, so it can only reset the chip.

pintert3 commented 2 years ago

Doesn't seem like we'll be able to just prolong watchdogs anymore. We'll probably need to use them more sparingly this time. Or perhaps, since it looks like the mission is to interrupt and prolong, then we could get the time from the RTC and use that to keep the 5 min mark exact

mpiima1 commented 2 years ago

Btw, can't we use the rtc it's to triger using an external interup with internal flags

pintert3 commented 2 years ago

Do you mean to use it to trigger a system reset using the ISR?

mpiima1 commented 2 years ago

Yeah

mpiima1 commented 2 years ago

But not always, only when there was a hung, and therefore a certain flag has not been set

pintert3 commented 2 years ago

Take a quick look at this: github.com/mchlbrnhrd/nanoEvery