??? 02/25/09 09:46 Read: times Msg Score: +2 +2 Good Answer/Helpful |
#162817 - Deadlock Responding to: ???'s previous message |
A design where the interrupt requires the reception of two characters is a design that will lock up if you get a transfer error or for some other reason only get a single character.
The idea is broken, and should be abandoned. Let your interrupt accept characters and place them in a queue. Let your main task pick up and perform actions. And let your main task decide what to do if a command byte isn't followed by a data byte within the expected time. But do not try to complicate your interrupts and at the same time lock up your processor busy-waiting for what may never arrive. |
Topic | Author | Date |
cascading RI in 89C51 | 01/01/70 00:00 | |
Does it compile? | 01/01/70 00:00 | |
Deadlock | 01/01/70 00:00 | |
polled![]() | 01/01/70 00:00 |