IMX6 ULL: Using GPT capture pin (GPIO1:21) for event notification

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

IMX6 ULL: Using GPT capture pin (GPIO1:21) for event notification

1,171 Views
phaniteja
Contributor II

Hello,

I have successfully tested GPIO1: 21 pin for event notification by doing following steps:

->irq = gpio_to_irq(21)

->devm_request_irq(p_dev, irq, irq_handler....)

For DTS changes: 

I have commneted all functions for this particular pin and did following steps:

$ /unit_tests/memtool IOMUXC.SW_MUX_CTL_PAD_UART2_RX_DATA.MUX_MODE=5 SOC: i.MX6UL
$ /unit_tests/memtool IOMUXC.SW_MUX_CTL_PAD_UART2_RX_DATA.SION=1 SOC: i.MX6UL

Here When I ever I provide signal on this pin, irq handler will get triggered. 

Now I want to test the same handler using same pin but as GPT capture pin

Could anybody suggest how to do this? It will be really helpfull if somebody share some example

Thanks,

Phani Movva

Labels (1)
0 Kudos
3 Replies

768 Views
igorpadykov
NXP Employee
NXP Employee

Hi Phani

for gpt capture example one can look at sdk examples (i.MX6ULL has the same gpt module)

which can be found on SMP Enable in IMX6 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

768 Views
phaniteja
Contributor II

Thanks Igor for your quick response. I will go through the sdk section and try to reuse them. 

Could you please correct me for the following points:

1.For imx6 ull, are we using gpt1 to calculate system ticks?

2. If yes for my first question, can we use gpt2.capture2 for notifying the falling/raising edge events?

3. If no for my second question, could you please suggest how to make it possible

Also please confirm, the provided sdk supports mx6dq, mx6sdl and mx6sl. Could you please let us know which one is similar or same as imx6 ull

Thanks,

Phani Movva

0 Kudos

768 Views
igorpadykov
NXP Employee
NXP Employee

Hi Phani

for linux timers (system ticks) one can refer to sect.3.3 Timer attached Linux Manual.

In general if GPIO1: 21 pin event notification works fine, one can reuse its codes

to create similar handler for gpt2.capture2 event.

Regarding " provided sdk supports mx6dq, mx6sdl and mx6sl", supported features and platforms

are described in Release Notes document included in each software package on  below link,

please check under "Documentation.

i.MX Software|NXP 

Best regards
igor

0 Kudos