GPT1 capture on rise and fall edge

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

GPT1 capture on rise and fall edge

跳至解决方案
865 次查看
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

 

 

 

标签 (1)
0 项奖励
1 解答
836 次查看
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

 

在原帖中查看解决方案

3 回复数
854 次查看
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 项奖励
837 次查看
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

 

858 次查看
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 项奖励