Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Maarten Brock
10/13/12 14:30
Read: 602 times
Tilburg
The Netherlands


 
#188635 - more bugs
Responding to: Marshall Brown's previous message
Kicking the watchdog inside a timer interrupt is almost the same as having no watchdog at all. Usually when the code runs away the interrupt keeps ticking.

Further you read a multibyte variable that gets updated by the ISR. This can give the LSB before and the MSB after the interrupt (or vice versa) with weird values at LSB overflow. You should make that atomic by disabling the interrupt around it.

And on top of that you also modify this variable in both places. You should extend the atomic operation to include the clearing as well.

List of 13 messages in thread
TopicAuthorDate
Timers - Function Pointers      Marshall Brown      10/03/12 21:08      
   Too much for a '51?      Oliver Sedlacek      10/04/12 02:05      
      I Agree      Marshall Brown      10/04/12 03:27      
   Function Pointers...      Andy Neil      10/04/12 05:50      
   you are violating KISS      Erik Malund      10/04/12 08:41      
   Various Timer Functions        Michael Karas      10/06/12 01:14      
      Thanks Michael      Marshall Brown      10/06/12 23:34      
         regardless, you are violating KISS        Erik Malund      10/09/12 07:44      
            even on ARM      Stefan KAnev      10/09/12 13:40      
            The timer simply increments      Marshall Brown      10/11/12 15:58      
               bug      Marshall Brown      10/11/12 16:08      
                  more bugs      Maarten Brock      10/13/12 14:30      
                     thanks      Marshall Brown      10/14/12 13:31      

Back to Subject List