E-timer CAPT1 and CAPT2 counts difference inaccurate (MPC5741)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

E-timer CAPT1 and CAPT2 counts difference inaccurate (MPC5741)

676 Views
debrajmukhopadh
Contributor I

Hi,

I am working on MPC5741 microcontroller. I am using E-timer (Etimer_1_CH4) module to detect the frequency & duty cycle of an input square pulse.

E-timer input clock frequency = 80MHz

Input Signal Frequency = 1 KHz;  so Input signal Period = 1ms ;Input Signal Duty Cycle = 50 %

Configured the CAPT1 for Rising Edge and CAPT2 for falling edge.

Theoretical calculation for the  difference of counts between cap1 and cap2 for the ON TIME of the pulse is : 

1ms/(2*(1/80M)) = 40,000 counts.

But when I checked in trace32 window, I found the difference is around 2.

Please have brief look of the E-timer Channel 4 Configurations and results captured in trace window.

pastedImage_4.png

pastedImage_3.png

Please give your valuable opinion to fix the bug. Expecting your reply soon.

Tags (2)
0 Kudos
Reply
1 Reply

595 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

it is not so soon but...

you have selected external input as primary source. You should select IPBus/1 clock to get similar result you expected.

BR, Petr

0 Kudos
Reply