Input Capture_LDD missing pulses

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

Input Capture_LDD missing pulses

516 Views
gschelotto
Contributor V

Hi,

I'm using the Capture_LDD component in order to measure a 20ms signal period. Everything goes well but sometimes the CapX_OnCapture ISR misses pulses (see ISR toggling image)

pic_266_1.gif

Here's the driver configuration. I use KDS 3.2.0 and the kinetis device is MKE02Z64VLH4

input capture issue.png

Please can anybody help me with this issue?

regards,

gaston

0 Kudos
2 Replies

345 Views
gschelotto
Contributor V

Well, I have managed to solve it but I still need some support to clarify the issue. Besides the Capture_LDD component I'm also using two TimerUnit_LDD components. Both of them set as timer counters with ISR interrupt enabled (every 1.024ms and minimal priority). Here's the TU1 and TU2 configurations:

Untitled.png

Untitled2.png

TU3 is referenced by the 2-channel Capture_LDD component and here's the PE configuration:

Untitled3.png

As I mentioned in previous post, when the TU1 and TU2 are enabled, I observe some missing pulses on the 40ms signal period. Disabling TU1 I still observe missing pulses. But just by disabling TU2 everything goes perfect! No missing pulses are observed. Why? Could anyone give me a hint?

regards,

gaston

0 Kudos

345 Views
gschelotto
Contributor V

Hi all,

I've definitely solved the issue! ...and I'll try to explain what I've done.

The problem is not related to TU1/TU2 timers but is related to the content of their IRS routines. I attach 2 KDS projects (InputCapture-Issue and InputCaptue-Ok) for better understanding of the problem.

On the InputCapture-Issue project I've implemented TU2_OnCounterRestart ISR with 5 GPIO outputs setts. In this case, these GPIOs are defined using PE as a GPIO_LDD group-of-bit-fields component (see next image)

Screenshot from 2017-06-23 10-53-24.png

In contrast, on the InputCapture-Ok project the 5 GPIOs are defined as single BitIO_LDD components as shown:

Screenshot from 2017-06-23 10-57-10.png

For the InputCapture-Ok project GPIO implementation I see no missing pulses on CapX_OnCapture ISR routines. Obviously, I can not say the same in the case of the InputCapure-Issue project as I can detect missing pulses.

Please, could anybody verify this behavior?

regards,

gaston

0 Kudos