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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/13/12 20:30
Read: times


 
#188635 - more bugs
Responding to: ???'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            01/01/70 00:00      
   Too much for a '51?            01/01/70 00:00      
      I Agree            01/01/70 00:00      
   Function Pointers...            01/01/70 00:00      
   you are violating KISS            01/01/70 00:00      
   Various Timer Functions            01/01/70 00:00      
      Thanks Michael            01/01/70 00:00      
         regardless, you are violating KISS            01/01/70 00:00      
            even on ARM            01/01/70 00:00      
            The timer simply increments            01/01/70 00:00      
               bug            01/01/70 00:00      
                  more bugs            01/01/70 00:00      
                     thanks            01/01/70 00:00      

Back to Subject List