MPC5744P eTimer 20MHz

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

MPC5744P eTimer 20MHz

ソリューションへジャンプ
2,154件の閲覧回数
mark_registraci
Contributor II

Hello,

I am having trouble setting eTimer on my MPC5744P board for frequency 20MHz. I followed example and I setup timer with this configuration, but I am getting signal with frequency 454kHz. IP Bus clock is MOT_CLK, am I right? If I'm wrong, is there any way to generate signal with such frequency?

INTC_0.PSR[611].R = 0x8001; // Set interrupt priority 1 for eTimer_0

ETIMER_0.ENBL.R = 0x0; // Disable all channels and their prescalers
ETIMER_0.CH[0].CTRL1.B.CNTMODE = 0x1; // Count on rising edge
ETIMER_0.CH[0].CTRL1.B.PRISRC = 0b11000; // IP Bus clock divided by 1 = 160MHz/1
ETIMER_0.CH[0].CTRL1.B.LENGTH = 0x1;
ETIMER_0.CH[0].COMP1.R = 1; // Compare value
ETIMER_0.CH[0].INTDMA.R = 0x0002; // Enable interrupt for COMP1
ETIMER_0.CH[0].CCCTRL.B.CMPMODE = 0b10; // COMP1 used
ETIMER_0.CH[0].CCCTRL.B.CPT1MODE = 0b01; // Capture event caused by falling edge

Thanks

0 件の賞賛
返信
1 解決策
2,032件の閲覧回数
mark_registraci
Contributor II

Hello,

pin is controlled by SW in eTimer interrupt routine. So if I what to reach 20MHz, I should use OFLAG functionality?

Thanks

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
2,032件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

what is channel output mode setting (CTRL2[OUTMODE]). Is this set somehow?

Or do you control output pin by SW within eTIMER interrupt routine? If the latter one, then the observed signal frequency is quite reasonable.

BR, Petr

0 件の賞賛
返信
2,033件の閲覧回数
mark_registraci
Contributor II

Hello,

pin is controlled by SW in eTimer interrupt routine. So if I what to reach 20MHz, I should use OFLAG functionality?

Thanks

0 件の賞賛
返信
2,032件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

yes.

BR, Petr

0 件の賞賛
返信