PORT B Pin 2 GPIO Interrupt not being triggered

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PORT B Pin 2 GPIO Interrupt not being triggered

658件の閲覧回数
Rashmitha_Nair
Contributor III

Hi,

I am trying to get PORT B Pin 2 to detect a rising edge of a 16khz clock signal from another board.

Attached is my project.

All the initializations are done properly, but the ISR never gets triggered (i.e. the control never reaches the ISR)

Could you please check what could be the issue?

 

Regards,

Rashmitha

0 件の賞賛
2 返答(返信)

644件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Thanks to Erich for the reminder, I found that the location of the relevant code was confusing, so I debugged it directly on the FRDM-K64F.

Found a problem:

GPIO_PortClearInterruptFlags(BOARD_PWM_SYCNH_TRG_PIN, 1U << BOARD_PWM_SYCNH_TRG_PIN);

GPIO_PortClearInterruptFlags.png

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛

655件の閲覧回数
ErichStyger
Senior Contributor V

without checking too much of your code:

- have you tried the the interrupts *without* that high frequency? Just enabling interrupts on that pin and try with a jumper/button?

- I see that in GPIOInit() you are not actually intializing the pin for interrupts (it as all commented out). Instead you are calling BOARD_InitPeripherals() which shall usually happen in main.

I recommend that you have a look at the pin logic levels (not sure what you have on your board there), with a logic analyzer or scope, just to verify the levels are indeed changing.

I hope this helps,

Erich

0 件の賞賛