s32k312 gpio detecting the edge

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

s32k312 gpio detecting the edge

620 Views
fengba_360
Contributor III

Hello, I have a small request for consultation. I would like to trigger an event by detecting the rising edge or falling edge of a pin, for example, setting a flag to 1 when a rising edge is detected and setting it to 0 when a falling edge is detected. I have reviewed relevant materials and found that this can be achieved through the IP-layer component siul2_icu configuration. However, when using dual-edge detection, how can I determine whether it was triggered by a rising edge or a falling edge? Please guide me on this. Thank you!

微信图片_20250121104045.png

0 Kudos
Reply
1 Reply

602 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

I don't see any flag in the related register to distinguish between rising and falling edges, so I'm afraid you need to read the current voltage of the pin in the callback to make a judgment.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" 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 Kudos
Reply