hai all,
I m doing rtos programming which is based on osek standard for LPC2138. In that i need to enter the supervisor mode for running the tasks & all my code must runs under svc mode. but main prog is running in user mode if i use the startup.s in the keil. so i had changed the startup.s to run the main in svc mode by commenting the usermode stack initialization. Now it is running under SVC mode. but the problem is when i enter into IRQ mode i call some user functions through asm & changing the mode into SVC to save task stack back into IRQ mode , at that time the global variables are changed.Pls give some tech ass regarding this issue.(I need the global variables won't change )
Thanks in advance,
yos
interrupts during context switch
not required. nested interrupts are disabled by default!
allow the nesting of interrupts in that we use task stack or ISR stack to store
this sounds a little dangerous to me. can you see why?
non of this is a good reason to work in SVC mode. as stated already: stick to user mode except for handling processor exception. a context switch is indeed such a condition but it can be perfectly handled in IRQ mode. you are doing dangerous things out there. running all tasks in SVC allow them uncontrolled access to CPSR - it that your intention?
"changing the modes of the processor at runtime , disabling & enabling the interrupts during context switch, allow the nesting of interrupts in that we use task stack or ISR stack to store."
This is a list of what you want to do, but there is still not any motivation.