Re: [Kinetis Microcontrollers] - Re: Glitch filter setting of the IRQ-pin of KEA

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: [Kinetis Microcontrollers] - Re: Glitch filter setting of the IRQ-pin of KEA

135 Views
Contributor I

Hi Jing-san

Thank you for a sample code of irq.c.zip. However, since some header files are missing, I couldn’t try this.

Instead, I created a test code by myself. Now, I’m a little confusing about the filter function.

According to my test result, I couldn’t filter out a glitch signal by FLTRST-bits. The followings are settings and instructions

Please let me know if I have some mistake or misunderstandings.

Settings : Please refer to the attached code

- set FLTRST=0b11 and FLTDIV3=0b000. So, the filter frequency at PTA5/RESET/IRQ-pin is LPOCLK(1kHz). That is, less than 1ms pulse can be filtered out, correct?

- Then disabled the RESET-pin and enabled the IRQ-pin as falling edge detection.

- After that, input a 11us low-pulse to the PTA5/RESET/IRQ-pin (pulse.png). And then confirmed IRQ_SC[IRQF] could be set by the low pulse which is less than 1ms.

When I set both FLTRST = FLTA = FLTDIV3(1kHz) ,the result was the same.

If you can share your whole project file, please send it to me. I’d like to try your code in my environment.

BR.

Hiroyoshi Suzuki

0 Kudos
5 Replies

5 Views
NXP TechSupport
NXP TechSupport

Hi Hiroyoshi,

I haven't KEA128. This project is for KE04. It should can run on KEA64. Please take a try.

Regards,

Jing

0 Kudos

5 Views
Contributor I

Hi Jing-san

Thank you for sharing you code.
But unfortunately, I don’t have an EVB for KEA64. So I can’t try your project right now.
Also, I couldn’t import your project file by S32DS. Maybe, this code is for other than S32DS debugger such as Keil, right?

By the way, as you know, KEA64 doesn’t have a function to change the IRQ-pin mapping.
So, you can’t check the function difference between FLTRST-bit and FLTIRQ-bit, correct?
This was my first question…


About your code:
 > BOARD_BootClockRUN();
 > PORT_SetFilterSelect(PORT, PORT_IOFLT_FLTRST_SHIFT, kPORT_FILTERDIV2);   //jpan enable FLTRST
Is your setting as the followings?
 - Bus=20MHz
 - Filter frequency for PTA/IRQ-pin is  BUSCLK/32 (=625kHz)
 - Less than 1.6us (1/625kHz) low pulse can be filtered.

Have you confirm that less than 1.6us low pulse can be filtered, and more than 1.6us low pulse can detect as IRQ?
This is my second question.

In my test code, I selected a 1kHz (FLTRST=0b11) for filter frequency. But, this setting couldn't filter a 11us low pulse.
If you notice some error in my code, please let me know.


Thank you.
BR.
Hiroyoshi

0 Kudos

5 Views
Contributor I

Hi

I confirmed the followings by my simple test.

1, about FLTRST-bits function of KEAZ128
In the RM of KEAZ128, it says that the FLTRST-bits are effective to both RESET-pin and IRQ-pin as the below.
        “Filter Selection for Input from RESET/IRQ”
This sentence is same with KEAZN64 RM. But according to my test result, FLTRST-bits of KEAZ128 was effective to only for RESET-pin. To filter out some glitch pulses from IRQ-pin, need to use FLTIRQ-bits.  
So, it is better to correct the explanation of FLTRST-bits of KEAZ128 RM, I think. (remove an "IRQ")

2, Effective pulse width for FLTRST-bits
If filter frequency is 1KHz of LPOCLK, less than 1ms low-pulse was able to filter out. And, IRQ-pin started to receive the pulse around 1.2ms low-pulse, although it is not 100%.
When low-pulse becomes around 2ms, IRQ was able to receive the pulse, 100%. This was a reasonable result.0%.

BR.
Hiroyoshi

0 Kudos

5 Views
NXP TechSupport
NXP TechSupport

Hi,

1.Yes, you are right. I got a KE06 and test this function again. It seems FLTRST has no use on RESET-pin IRQ function.

2. Yes, filter need at least 2 clock edge to pass the signal. If the signal is between 1ms ans 2ms, it may not cover 2 clock edge.

Regards,

Jing

0 Kudos

5 Views
Contributor I

Hi

Thank you for your confirmation.

Hiroyoshi

0 Kudos