How to set GPIO high level interrupt by EB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to set GPIO high level interrupt by EB

跳至解决方案
1,668 次查看
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 项奖励
回复
1 解答
1,630 次查看
xaiodongyang
Contributor II

Hi @dan:

Thank you for your answer.

I will try it.

Thanks

在原帖中查看解决方案

4 回复数
1,652 次查看
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

标记 (1)
0 项奖励
回复
1,641 次查看
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 项奖励
回复
1,637 次查看
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 项奖励
回复
1,631 次查看
xaiodongyang
Contributor II

Hi @dan:

Thank you for your answer.

I will try it.

Thanks