LPC546xx: pin used as a capture for CTIMER and GPIO input

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

LPC546xx: pin used as a capture for CTIMER and GPIO input

578 Views
giusloq
Contributor III

I want to use a pin as a CTIMER capture input for both edges. When the ISR is fired, I want to read the digital input level to understand if the trigger that fired the ISR has been for rising or following edge.

However I don't know if it is possible, because it seems GPIO functionalities are disabled when the pin is configured as a "special function" (in my case, timer capture).

Moreover I can't deduce the edge that caused the trigger, because the interrupt flag isn't splitted between rising and falling, there's only one flag per input capture.

0 Kudos
Reply
1 Reply

575 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Giuseppe,

Even if you configure the pin as peripheral function instead of GPIO, generally, you can read the GPIO port pin register to get the current logic of the pin. For example, you configure the FUNC bit as 4 in IOCON register of P2_17, you can read the GPIO2 port pin register to get the logic of P2_17.

For detailed inf, pls refer to section 13.5.5 GPIO port pin registers in UM10912.pdf

Hope it can help you

BR

XiangJun Rong

 

0 Kudos
Reply