Hi,
I'm using GPT to capture data from two different ICs.
The pins that I'm using are:
IOMUXC_SAI3_RXFS_GPT1_CAPTURE1 and IOMUXC_SAI3_TXFS_GPT1_CAPTURE2
The first one capturing (IOMUXC_SAI3_RXFS_GPT1_CAPTURE1) is working fine but the second one (IOMUXC_SAI3_TXFS_GPT1_CAPTURE2) is NOT (not getting any irq).
I have check with oscilloscope and the data is coming at IOMUXC_SAI3_TXFS_GPT1_CAPTURE2.
These are mine definition for firs capture that works fine:
#define EM_GPT_IRQn GPT1_IRQn
#define EM_GPT_BASE GPT1
/* GPT channel used for input capture */
#define EM_BOARD_GPT_INPUT_CAPTURE_CHANNEL kGPT_InputCapture_Channel1
/* Interrupt to enable and flag to read; depends on the GPT channel used */
#define EM_GPT_CAPTURE_IRQHandler GPT1_IRQHandler
#define EM_BOARD_GPT_CHANNEL_INTERRUPT_ENABLE kGPT_InputCapture1InterruptEnable
#define EM_BOARD_GPT_CHANNEL_FLAG kGPT_InputCapture1Flag
I'm not sure how definition shall look like for second capture!
This is how it looks like now. Not sure if this is correct.
#define RF_GPT_IRQn GPT2_IRQn
#define RF_GPT_BASE GPT2
/* GPT channel used for input capture */
#define RF_BOARD_GPT_INPUT_CAPTURE_CHANNEL kGPT_InputCapture_Channel1
/* Interrupt to enable and flag to read; depends on the GPT channel used */
#define RF_GPT_CAPTURE_IRQHandler GPT2_IRQHandler
#define RF_BOARD_GPT_CHANNEL_INTERRUPT_ENABLE kGPT_InputCapture1InterruptEnable
#define RF_BOARD_GPT_CHANNEL_FLAG kGPT_InputCapture1Flag
Is there any example that shows how to use 2 captures or how to configure GPT for "SAI3_TXFS_GPT1_CAPTURE2"?
Hope someone can help me with this.
Best regards,
Adde
Solved! Go to Solution.
Hi Adde
>I'm not sure how definition shall look like for second capture!
>This is how it looks like now. Not sure if this is correct.
>#define RF_GPT_IRQn GPT2_IRQn
>#define RF_GPT_BASE GPT2
for GPT2 CAPTURE signals are not routed externally as described in sect.8.1.1.1 Muxing Options
i.MX 8M Dual/8M QuadLite/8M Quad Applications Processors Reference Manual
So such capture functionality is possible only with GPT1.
Best regards
igor
Hi Adde
>I'm not sure how definition shall look like for second capture!
>This is how it looks like now. Not sure if this is correct.
>#define RF_GPT_IRQn GPT2_IRQn
>#define RF_GPT_BASE GPT2
for GPT2 CAPTURE signals are not routed externally as described in sect.8.1.1.1 Muxing Options
i.MX 8M Dual/8M QuadLite/8M Quad Applications Processors Reference Manual
So such capture functionality is possible only with GPT1.
Best regards
igor