I want to make my software safer by using a watchdog
(a short interruption for restart is no problem).
In total it is a sort of digital software receiver running
functions in real time with different sample rates.
The problem is, that there are some independently
running functions and I think I want to make
sure that all functions operate properly.
The structure is as follows:
A fast timer1 interrupt running at about 10k interrupts per second.
Every 8 timer1-interrupt this routine fills one A-value into a FIFO.
The main-program is an infinite loop.
Always if A-values are ready in the FIFO, the main loop
triggers a function that fetches the A-values from the FIFO
and computes a new B-value using these values.
Then there is a timer2 interrupt that triggers a function
1000 times per second. This function takes the actual B-value
and computes a C-value and putputs bits on a port..
If I would reset the watchdog in the interrupt-routines
and one timer interrupt would be disabled due to a
malfunction, then the other interrupt would still
reset the watchdog and so the watchdog in this
simple way makes no sense.
The problem for me is: How can test that all the different
functions work properly.
In short: How to use a watchdog in a multi-interrupt setting?
Any suggestions welcome!