GPT1 capture on rise and fall edge

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

GPT1 capture on rise and fall edge

Jump to solution
816 Views
adde_ado
Contributor III

Hi, 

I'm using GPT1 to capture data from an IC circuit.

Interrupt is triggering on rise and fall edges (kGPT_InputOperation_BothEdge) and everything works fine.

My question is what I cad do to even capture data signal levels at interrupt event  i.e. "low or high"?

I have gone through chapters 12.1.5.1 to 12.1.5.10 but no of the registers contains that information.

Document Number: IMX8MMRM
Rev. 3, 11/2020 

Pin used: IOMUXC_SAI3_RXFS_GPT1_CAPTURE1

Best regards,

Adde

 

 

 

Labels (1)
0 Kudos
1 Solution
787 Views
igorpadykov
NXP Employee
NXP Employee

>How can I determine if interrupt has occurred on rising or falling edge.

 

sorry there is no way for that. In general one can reconfigure pin as gpio and read its state

in interrupt service routine.

 

Best regards
igor

 

View solution in original post

3 Replies
805 Views
adde_ado
Contributor III

Hi Igor, 

But IMn is a configure bit. 

This can be used to determine how transition on the input pin has been "configured".

For example wit "GPT_GetInputOperationMode" function.

In my configuration event is trigger on both rising and falling edge. 

How can I determine if interrupt has occurred on rising or falling edge.

Best regards,

Adde 

 

 

0 Kudos
788 Views
igorpadykov
NXP Employee
NXP Employee

>How can I determine if interrupt has occurred on rising or falling edge.

 

sorry there is no way for that. In general one can reconfigure pin as gpio and read its state

in interrupt service routine.

 

Best regards
igor

 

809 Views
igorpadykov
NXP Employee
NXP Employee

He Adde

 

>what I cad do to even capture data signal levels at interrupt event  i.e. "low or high"?

 

only available options are described in sect.12.1.5.1 GPT Control Register (GPTx_CR)

i.MX 8M Mini Applications Processor Reference Manual 

 

The IMn bit field determines the transition on the input pin (for Input capture channel n), which will trigger a
capture event.
00 capture disabled
01 capture on rising edge only
10 capture on falling edge only
11 capture on both edges

 

Best regards
igor

0 Kudos