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 have a problem when I use “isr_evt_set†in my UART interrupt routine: It ca not reach to “ os_evt_wait_or(0x0001,0xffff);â€
But if I just change “isr_evt_set†to “os_evt_setâ€, my code works fine. Anybody knows what’s wrong? I am using MCB2300 board. Part of code here:
void UART3Handler (void) __irq { isr_evt_set(0x0001,UART3_TASK); /*use "os_evt_set" works*/ VICVectAddr = 0; /* Acknowledge Interrupt */ } void task_UART3_received (void) __task { BYTE IIRValue, LSRValue; BYTE Dummy = Dummy; for(;;) { can not get here if I use "isr_evt_set": os_evt_wait_or(0x0001,0xffff); ...... }
Thanks Jack
Sorry some chars can not be read, post my question again: Hi All: I have a problem when I use "isr_evt_set" in my UART interrupt routine: It can not reach to "os_evt_wait_or(0x0001,0xffff);"
But if I just change "isr_evt_set"to "os_evt_set", my code works fine. Anybody knows what's wrong? I am using MCB2300 board. see my code above
Thanks
Jack
Hi Jack,
is your system startup deterministic? Do you have UART task3 actually created when the first interrupt occurs?
By using "os_evt_set" you may compensate a existing error through the introduction of an second error.
-Frank
Thank you Frank! I did not change anything in LPC2300.s. what system startup deterministics mean? I am sure all tasks are created before the first interrupt occurs.
Zhen
Deterministic - order of creation always the same.
Great care should be used when the first threads starts running while you are busy creating more threads - or interrupts starts to tick.
Hi Per Westermark, I will review my code first tomorrow. Thanks again Jack