Reply to post: Re: Sounds like an infinite loop chewing a cpu core

We asked for your Fitbit horror stories and, oh wow, did you deliver: Readers sync their teeth into 'junk' gizmos

fajensen Silver badge
Headmaster

Re: Sounds like an infinite loop chewing a cpu core

With these kinds of "must-never-hang"-embedded devices one often deliberately writes the entire application as a long chain of subroutines that are passed once for every watchdog "tick". Each subroutine has "running" and "completed" flags, if "completed" it can be called again.

Done that way the program always hangs and always resets.

Back in the day we used a technique called 'Coloured Petri Nets' to mathematically guarantee that the software couldn't get into a hanging state / closed loop somewhere along the path.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

SUBSCRIBE TO OUR WEEKLY TECH NEWSLETTER

Biting the hand that feeds IT © 1998–2019