Hi jiannianli,
You can use the FGPIO to control the GPIO output and the read the input, or use the interrupt to read the PTD4 input, it will be more quick than your polling mode.
In fact, even you just toggle the GPIO output, it will also need the times, FGPIO toggle frequency can reach to the core clock /2.
Your test result time in fact include two part, detect the PTD4 time, and the GPIO output time. Obout the test IO output time, you can toggle it directly in the code and test it, then use your orginal test time minus the GPIO output time, it is your PTD4 detect time.
Wish it helps you!
If you still have questions about it, please kindly let me know!
Best Regards,
Kerry
-------------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------