??? 04/12/07 07:34 Read: times |
#137019 - Sounds like an atomicity problem Responding to: ???'s previous message |
Chen - read up on the term 'atomicity'. Sounds like your code doesn't take into account this fundamental concept.
With many compilers, variables shared between the interrupt service routines and non interrupt service routines must be declared 'volatile'. Also, when reading/writing variables between isr and non isr code, the non isr code must disable interrupts momentarily whilst it accesses the shared variable, then re-enables the interrupts. As such, your mcu doesn't die, it probably gets caught in a loop. |
Topic | Author | Date |
two interrupts request at the same time | 01/01/70 00:00 | |
datasheet | 01/01/70 00:00 | |
right,but | 01/01/70 00:00 | |
error? what kind of error? | 01/01/70 00:00 | |
not reset,in debug PC don't change any more | 01/01/70 00:00 | |
Sounds like an atomicity problem | 01/01/70 00:00 | |
Maybe an event gets lost | 01/01/70 00:00 | |
initialization sequencing | 01/01/70 00:00 | |
a rare bug.... | 01/01/70 00:00 | |
Interupts![]() | 01/01/70 00:00 |