Hello @_Ferrari_ ,
Thanks for your post.
For the MCXA153, this can be implemented as follows:
1. Configure P2_2 to its CTIMER input function, i.e. set ALT4 = CT_INP12;
2. Use the corresponding INPUTMUX to route a selected CTIMER CAP channel to CT_INP12;
3. After a timeout occurs, read the corresponding bit in the GPIO input status register (PDIR) directly.
Please note that the GPIO PDIR register always reflects the actual logic level of the pin, regardless of which digital function the pin is configured for.

Hope it helps.
BR
Celeste
------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!
------------------------------------------------------------------------------------------------------------------