We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi All,
I am working on project using At91sam7s128 and have isr_evt_set(0x0001,TaskIDUSPort0) inside my uart interrupt.
Question is what will happen if another new uart interrupt occurs while I am processing in TaskIDUSPort0. isr_evt_set(0x0001,TaskIDUSPort0) will send same event again, right?
It looks like isr_evt_set stops working after multiple hits.
Any comments are welcome!
Xiao
Don't think isr_evt_set buffers up multiple calls.
So you get a signal to say one or more signals have happened.
Don't you?
The waiting task will get one (1) signal to wake up. When it wakes up, it should consume all data it can.
If you get another interrupt before the task has woken, it doesn't matter that only one event gets sent. The new character should be queued, and when the task waits, it will process all characters available.
If you get another interrupt after the task has woken and processed all data, the task will return to the wait and immediately get the event to process the new character.
If you get another interrupt after the task has woken but before it has left the read loop, it will read this new character and on the next wait call will be immediately woken but not find any data to eat. No big problem.
Hi all,
Thank you for your replys!
The event (isr_evt_set) should be sent after the UART gets a byte with parity error. Normally, it should be only one interrupt in one complete frame. If something wrong in the incoming frame, it could have serveral bytes with parity error one right after the other. Most time these bytes (Interrupts) will stop the isr_evt_set. I can see that isr_evt_set is called (set break point), but the UART task gets nothing.