Hi everyone,
I'm new to MCU programming and I can't get my XGATE to service my PIT interrupts although I get them to work on my CPU12.
I'm using mc9s12XEP10CAL chip, and CodeWarrior 5.9.0 build 2836.
I configured the XGATE as described in some APP notes (AN3144, and AN2685). but i still don't get any results.
Is there any special configuration to get the XGATE to start ?
Thank you.
Ali.
Solved! Go to Solution.
Did you use new project wizard and told there you are going to use XGATE? If so, then XGATE should execute at least dummy SoftwareTrigger0_Handler() from xgate.cxgate. Doesn't it run?
If it runs, then you should do following:
1) You should either add XGSWT = 0x100; to SoftwareTrigger0_Handler(), or remove XGSWT= 0x0101; from SetupXATE() in main.c. This is to prevent software thread 0 executing again and again, taking all XGATE time.
2) add PIT handler to *.cxgate file
3) edit XGATE vectors table to point to PIT handler
4) route PIT interrupt to XGATE. Add this to SetupXGATE:
ROUTE_INTERRUPT(Vpit0, 0x81); // route PIT0 to XGATE
Now, if PIT is setup properly, XGATE shoud handle PIT interrupts
Did you use new project wizard and told there you are going to use XGATE? If so, then XGATE should execute at least dummy SoftwareTrigger0_Handler() from xgate.cxgate. Doesn't it run?
If it runs, then you should do following:
1) You should either add XGSWT = 0x100; to SoftwareTrigger0_Handler(), or remove XGSWT= 0x0101; from SetupXATE() in main.c. This is to prevent software thread 0 executing again and again, taking all XGATE time.
2) add PIT handler to *.cxgate file
3) edit XGATE vectors table to point to PIT handler
4) route PIT interrupt to XGATE. Add this to SetupXGATE:
ROUTE_INTERRUPT(Vpit0, 0x81); // route PIT0 to XGATE
Now, if PIT is setup properly, XGATE shoud handle PIT interrupts
Thanks, it works perfectly.
Ali.