This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Watchdog and sequential monitoring

Hello All,

I am trying to figure out how best to write a sequential code execution monitoring diagnostic for my 8051 project. I want to be able to prove that the code execution has hit all of my 8 tasks before resetting the watchdog timer.

Each task is done at 1.25msec time intervals, they must happen in order, and it takes all 8 to complete the sequence.

It seems like there might be a way to encode a single byte that's end value proves I went through all 8 states and in the right order.

My first instinct is to simply advance a counter, but that can be fooled if stuck in the same task the right number of times. Maybe if I folded in an 8-bit CRC to a register?

Any suggestions are appreciated. (except for the condesending type)

Parents
  • Set a bit in a byte for each task (you have 8) when the number is 0xFF (255) each task has been completed.

    That will show that all tasks have run, but not necessarily that they ran in the correct order.

    However, if you check whether the bits of earlier tasks have already been set, and only set the tasks bit if the earlier tasks did already run and the later tasks did not, you might get an indication of the correct order.

Reply
  • Set a bit in a byte for each task (you have 8) when the number is 0xFF (255) each task has been completed.

    That will show that all tasks have run, but not necessarily that they ran in the correct order.

    However, if you check whether the bits of earlier tasks have already been set, and only set the tasks bit if the earlier tasks did already run and the later tasks did not, you might get an indication of the correct order.

Children