Page 3 of 3
Posted: Fri May 25, 2007 8:52 am
by xyjamepa
Any one there come on guys....
Posted: Fri May 25, 2007 9:28 am
by AJ
Sorry - I've just got a lot busier over the last few days - it's going to be next week before I get a chance to look it over properly, but I'm interested in it so will look asap.
Posted: Sat May 26, 2007 6:14 am
by xyjamepa
Hi...
let's clarify an opinion if the IRQ0 fires 18.222 times per second
and each time IRQ0 fires, cpu will automatically switch to PL0
so PL3 will never get the time to execute its code....I'm right?
realy guys I'm soooooooo confused about that,and till now I couldn't
go back to PL0.
Thanx.
Posted: Sat May 26, 2007 8:10 am
by frank
Yes, When the interrupt fires it will switch to PL0. But when the interrupt is done and executes the iret the processor will automatically switch back to whatever privelege level that it was at before the interrupt was triggered.
About your problem with switching back to PL0, Are you trying to iret from the PL3 task back to the PL0 task? Because from looking at your code, that is what I think you are trying to do. In that case you will have to do a long call to the new task instead of a long jump. Remember you can return from a call but not from a jump.
Posted: Sat May 26, 2007 4:29 pm
by xyjamepa
Finally It's working I was tring to go back from PL3 to PL0
and I was using long jump to switch to PL3 but I ccouldn't go back again.
Now I'm using long call as frank said with iret instruction at the end
of called task and now my multitasking can switch from PL0->PL3->PL0.
Thank you guys for your help,I'm so grateful.
Thanx.