S12XDP512 Xgate problem

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

S12XDP512 Xgate problem

1,724 次查看
supriya
Contributor I
Hi,
 
I am using S12XDP512 with Code warrior 4.5.
I am using xgat. we can activate xgate by using the hardware inrterrupt but i want to activate it by using software interrupt. so, pls tell me is there any way to access xgate with s/w interrupt & how???
or is there any other way to access the xgate?
 
Pls help me about the same.
 
 
regards,
 
supriya 
标签 (1)
0 项奖励
回复
1 回复

709 次查看
kef
Specialist I
I wonder how could you have problems with software interrupt if CW project wizard creates code for this. Did you specify in the wizard that you want to use both cores? It should generate SetupXGATE function:
 
Code:
#define SOFTWARETRIGGER0_VEC  0x72 /* vector address= 2 * channel id */static void SetupXGATE(void) {  /* initialize the XGATE vector block and     set the XGVBR register to its start address */  XGVBR= (unsigned int)(void*__far)(XGATE_VectorTable - XGATE_VECTOR_OFFSET);  /* switch software trigger 0 interrupt to XGATE */  ROUTE_INTERRUPT(SOFTWARETRIGGER0_VEC, 0x81); /* RQST=1 and PRIO=1 */  /* enable XGATE mode and interrupts */  XGMCTL= 0xFBC1; /* XGE | XGFRZ | XGIE */  /* force execution of software trigger 0 handler */  XGSWT= 0x0101;}
 
XGSWT = 0x0101; is what makes XGATE executing software trigger 0 handler. Isn't it what you want?
0 项奖励
回复