MPC5645S eMIOS_SAIC problem

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

MPC5645S eMIOS_SAIC problem

跳至解决方案
2,190 次查看
weiguoyan
Contributor II

Hi,

I am using the MPC5645S. I use the channel 20 and channel 21 of  the eMIOS1 with SAIC  mode. Two channels register configuration  and initialize  are the same. but the channel 21 can capture the input  frequency signal and enter the interrupt .The channel 20 can't enter the interrupt. 

who can help me to solve this problem.   

Thanks!

 

void EMIOS1Init(void)
{
EMIOS_1.MCR.B.GPRE = 255; // 64M/256=250kHz
EMIOS_1.MCR.B.GPREN = 1; 
EMIOS_1.MCR.B.FRZ = 1; 
}// end of EMIOS1Init

 

void CounterBusAInit(void)
{
EMIOS_1.CH[23].CADR.R = 0xFFFF;
EMIOS_1.CH[23].CCR.B.MODE = 0x50; 
EMIOS_1.CH[23].CCR.B.BSL = 0x3; 
EMIOS_1.CH[23].CCR.B.UCPRE = 0x1; // 250k/2 =125kHz
EMIOS_1.CH[23].CCR.B.UCPEN = 1;
EMIOS_1.CH[23].CCR.B.FREN = 1;
EMIOS_1.CH[23].CCR.B.FEN = 1;
}// end of CounterBusAInit

 

void ICInit(void)
{
UBYTE i;
SIU.PCR[PF1].R = 0x0500; // EMIOS1-20
SIU.PCR[PF3].R = 0x0500; // EMIOS1-21
EMIOS1Init(); 
for( i=20;i<22;i++ )
{
EMIOS_1.CH[i].CCR.B.MODE = 0x02; // SAIC mode
EMIOS_1.CH[i].CCR.B.BSL = 0x00; 
EMIOS_1.CH[i].CCR.B.IF = 0x02;
EMIOS_1.CH[i].CCR.B.FCK = 1;
EMIOS_1.CH[i].CCR.B.FEN = 1;
EMIOS_1.CH[i].CCR.B.DMA = 0; 
EMIOS_1.CH[i].CCR.B.EDSEL = 0; 
EMIOS_1.CH[i].CCR.B.EDPOL = 1; 
EMIOS_1.CH[i].CCR.B.UCPRE = 0; 
EMIOS_1.CH[i].CCR.B.UCPEN = 1; 
EMIOS_1.CH[i].CCR.B.FREN = 1; 
}
CounterBusAInit(); 
INTC_InstallINTCInterruptHandler(ISR_SAIC20,169,3);
INTC_InstallINTCInterruptHandler(ISR_SAIC21,170,3);
INTC_InstallINTCInterruptHandler(ISR_EMIOS123OVFL,172,3);
}// end of ICInit

标签 (1)
标记 (1)
1 解答
2,004 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

You have to route the pin PF1 to eMIOS1[20] with the help of SIU.PSMI register. See table 43-14 of the RM and set PSMI[44]=1.

 

BR, Petr

在原帖中查看解决方案

3 回复数
2,005 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

You have to route the pin PF1 to eMIOS1[20] with the help of SIU.PSMI register. See table 43-14 of the RM and set PSMI[44]=1.

 

BR, Petr

2,004 次查看
weiguoyan
Contributor II

Thank you for your answer. 

The problem is resolved.

Best wishes!

0 项奖励
回复
2,004 次查看
weiguoyan
Contributor II

Thank you for your answer. The problem is resolved.

Best wishes!

0 项奖励
回复