How to set GPIO high level interrupt by EB

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

How to set GPIO high level interrupt by EB

Jump to solution
1,661 Views
xaiodongyang
Contributor II

I am using an S32K148 MCU.

I want to set a GPIO(eg:PTD22)to high level interrupt, However, it cannot be set through the ICU module.

GPIO of s32k148 supports high-level interrupt。

RM:

1000 ISF flag and Interrupt when logic 0.
1001 ISF flag and Interrupt on rising-edge
1010 ISF flag and Interrupt on falling-edge
1011 ISF flag and Interrupt on either edge


Question:How to set GPIO high level interrupt by EB

Thanks.

0 Kudos
Reply
1 Solution
1,623 Views
xaiodongyang
Contributor II

Hi @dan:

Thank you for your answer.

I will try it.

Thanks

View solution in original post

4 Replies
1,645 Views
DanNguyenDuy
NXP Employee
NXP Employee

Hi @xaiodongyang,

You can refer to the attached example with FALLING EDGE, if you want to use RISING EDGE, you can modify "IcuDefaultStartEdge" to ICU_RISING_EDGE.

Please install S32K1XX_MCAL4_3_RTM_1_0_2 and EB 24.0.1 for this example.

Best regards,

Dan

Tags (1)
0 Kudos
Reply
1,634 Views
xaiodongyang
Contributor II
@Dan:
I donot want to use RISING EDGE,I want to use high level interrupt.
RM:
1100 ISF flag and Interrupt when logic 1.
I use SW32K1_RTD_4.4_1.0.1_HF01 and EB 27.1
Thanks.
0 Kudos
Reply
1,630 Views
DanNguyenDuy
NXP Employee
NXP Employee

Hi @xaiodongyang,

The ICU module didn't have a configuration for high-level interrupt. So, from my point of view, you can configure use of RISING EDGE interrupt with a notification function, and in this function, you call 

Icu_GetInputState() function to check whether the channel was high level.
 
Best regards,
Dan
 
0 Kudos
Reply
1,624 Views
xaiodongyang
Contributor II

Hi @dan:

Thank you for your answer.

I will try it.

Thanks