This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cascade interrupts

Hi,
First I tell my 'funny' situatuion short:
up Inf C167, RTX-166
- 'Main' Timer1 execute an interrupt func.(8ms tact)
- In this func. the PEC register PECC1 will be initialiazed and the AD converter will be startet (the data will be transfert over the PEC).
- After the PEC is finished a interrupt function will be executed, at the end of this function the X-Peripheral ISR XP2IR is set (only in this function!).
- In a task routine is the SW waiting with os_wait_interrupt(NILCARD) of this interrupt.
Note: all interrupts are 'correct' attachted (I hope so).
The SW (system) runs most correctly with a period of 8ms. I watch the execution with a Oszilloskop and I can see that not all time the os_wait_interrupt() wait correct. In 10h - 24h one error was occured always, the os_wait_interrupt() 'wait not for the correct time'.But the function return is checked (NOT_OK is not occurred and I check first if the interrupt not allready occured before waiting). I see too that the XP2IR ISR is not set at a bad moment. Why wait the task with os_wait_interrupt not for the end of the 8ms periode (it's wait already in the error case for ca 5ms instead of 8ms)!

Can someone tell me why the os_wait_interrupt() function not wait for 'my' flag 'XP2IR= 1;'.
Or can I not set the XP2IR from the end of PEC Interrupt function?

Thanks

0