MPC5645S eMIOS_SAIC problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5645S eMIOS_SAIC problem

ソリューションへジャンプ
2,127件の閲覧回数
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 解決策
1,941件の閲覧回数
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 返答(返信)
1,942件の閲覧回数
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

1,941件の閲覧回数
weiguoyan
Contributor II

Thank you for your answer. 

The problem is resolved.

Best wishes!

0 件の賞賛
返信
1,941件の閲覧回数
weiguoyan
Contributor II

Thank you for your answer. The problem is resolved.

Best wishes!

0 件の賞賛
返信