KL17 - pin interrupt will not fire...

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

KL17 - pin interrupt will not fire...

跳至解决方案
880 次查看
mitch1
Contributor II

I have a strange bug in code that was once working, i've been scratching my head for about a days work of work trying to figure this out.

Anyway, I use PTA4, (can be _NMI, but I only what falling edge triggers) as a falling edge interrupt, it will be used to wake from sleep, but for debug purposes I'm just printing out if the interrupt fires. 

Set up does the following:

PORT_SetPinMux(PORTA, 4U, kPORT_MuxAsGpio);

PORT_SetPinInterruptConfig(PORTA, 4, kPORT_InterruptFallingEdge);

... I've probed the line, the signal that should trigger the irq is happening. If I configure the pin for nmi, nmi does trigger, but since the signal can stay low for extended time, it triggers way to many irq's. I've also done follow up configuring the pin as GPIO input for good measure, but that doesn't make a difference seemingly. I really need this pin to trigger on falling edge only.

Thanks for any help!

标签 (1)
0 项奖励
回复
1 解答
875 次查看
mjbcswitzerland
Specialist V

Hi

Have you enabled Port A interrupts in the NVIC?

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/kinetis/FRDM-KL27Z.html

在原帖中查看解决方案

2 回复数
858 次查看
mitch1
Contributor II

Thank you sir, that indeed was missing. It always is simple once you find it.

0 项奖励
回复
876 次查看
mjbcswitzerland
Specialist V

Hi

Have you enabled Port A interrupts in the NVIC?

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/kinetis/FRDM-KL27Z.html