Why not just increment a VAR with a timer. When a Keep Alive is received the VAR drops back to zero. If the VAR reaches "X" then re-boot.

No ASM if PBP interrupts are used.