nobody wrote on Wednesday, February 22, 2006:
I am trying implement the FLASH task using the RTOS Demo for the HCS12 (banked) as a starting point (I removed all the other tasks, since I’m going for simplicity first time around). I had to make some changes since ProcessorExpert is not yet supported with the HCS12X. The changes I basically made were to setup the Periodic Interrupt Timer 0 as the RTOS Tick interrupt, hardcoding it for 1000 Hz (just like the demo). I changed the prvSetupTimerInterrupt() in port.c to simply start the PIT0 timer. The interrupt vector table is also updated so that the Tick ISR is serviced with the PIT0.
My problem is that in xBankedStartScheduler(), the application quits with an unknown event (quitting at the XIRQ interrupt for some reason). If I comment out the portRESTORE_CONTEXT(); and __asm( “rti” ); lines, it runs through (but obviously just sits in the loop in vMain()). I think its somewhere not correctly restoring the context so that the rti instruction goes to the correct Task, but I’ve been hung up for a while trying to track down what’s going on.
Does anyone have any suggestions on what may be causing the problem? I’m thinking theres still something I need to change so that RTOS is correctly ported to the HCS12X and its memory map in regards to storing a task’s context.
Anyway, any suggestion/help is greatly appreciated!