XGATE does not start

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

XGATE does not start

跳至解决方案
1,471 次查看
alturc
Contributor I

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.

标签 (1)
0 项奖励
回复
1 解答
991 次查看
kef
Specialist I

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
992 次查看
kef
Specialist I

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

0 项奖励
回复
991 次查看
alturc
Contributor I

Thanks, it works perfectly.

 

Ali.

0 项奖励
回复