Input Glitch Filter operation info

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

Input Glitch Filter operation info

Jump to solution
1,393 Views
Kratz
Contributor IV

Is there something I can read on how the input glitch filter works for the MKE02ZVLD2?  The reference manual has very little in it.

Does the input port sample and at what rate?

When is the sample available: Does the input scan before being polled and deliver the answer when polled by the application software, or does the answer come later after a delay set by the timer filter value some time after being polled?

What if the sample rate is longer than the application software polling time?

Labels (1)
0 Kudos
1 Solution
982 Views
Kratz
Contributor IV

Regarding the delay caused my be glitch filter, I can only say that the maximum delay is the 2*(filter period), but when you read the pin logic by reading the GPIOx_PDIR register, you get the value witch is set previously by the glitch filter circuit.

Copied from Freescale support.

View solution in original post

0 Kudos
5 Replies
983 Views
Kratz
Contributor IV

Regarding the delay caused my be glitch filter, I can only say that the maximum delay is the 2*(filter period), but when you read the pin logic by reading the GPIOx_PDIR register, you get the value witch is set previously by the glitch filter circuit.

Copied from Freescale support.

0 Kudos
982 Views
yasuhikokoumoto
Senior Contributor I

Hello Kevin,

the definition of the sample rate of the input glitch filter is difficult to say.

The input should be kept its level longer (strictly speaking 2 times longer) than the filter value (of course, it should be calculated to the time).

Otherwise, the input value is not propagated.

In no glitch case, the input signal will be delayed by the filter value.

I cannot understand your word of the polling time.

If it means a polling period, you can not consider the delay.

If it means a polling is finished within the time, the polling will not catch the input.

Can this be your answer?

Best regards,

Yasuhiko Koumoto.

0 Kudos
982 Views
Kratz
Contributor IV

I want to understand how the filter impacts the timing of embedded software.  I understand how the filter works, but what I am trying to understand is what is the timing of the filter relative to the processor's execution. Suppose the filter were set to a divide value of 4096. The processor has a bus frequency of 16MHz.  If the code calls for the input status for the input, does the answer come immediately, or does the processor wait for the duration of the filter period before executing the next line of code?

If the answer come immediately with no delay to the processor execution, it implies the the input is continuously sampling with no delay in processor execution.  If there is a delay in processor function, I should consider that in the timing of system.  Does this make more sense?

0 Kudos
982 Views
yasuhikokoumoto
Senior Contributor I

Hello Kevin,

I wonder why you have such a question if you understood how the filter worked. Also I cannot understand the idea that you should consider the system timing. You say you would make a polling. I think you will do so because the time delay is unknown. Please tell us what your concerning points are. Are there any problems if the input will come with some delay? In such the case, what should you consider?

Best regards,

Yasuhiko Koumoto.

0 Kudos
982 Views
Kratz
Contributor IV

Understanding the system timing in the micro will help explain how the the micro operation will interact with the external system.   Does the micro sit at the line of code until the filter delay is over? Does the input sample continually, so an answer is ready when the input is scanned?  Will a long delay slow the code execution?  I want to understand the consequence of choosing a very long filter time. Will that cause a delay of the response time or execution of a function?  That is why I am asking.

0 Kudos