i.MX7D GPT1 usage

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

i.MX7D GPT1 usage

706 Views
Ompie
Contributor I

Hello,

I would like to use General Purpose timer 1 on a board with the i.MX7d running Linux.

What I plan to do is to use GPT1 to divide a 4 MHz signal on an gpt1.CLK (ALT1 on ball name LCD_DAT2) and output the resulting frequency on the gpt1.COMPARE1 pin (ALT1 on Ball name LCD_RESET).

So basically, I need to configure GTP1 to use an external clock, and program the compare function.

The main question is what I have to do in order to achieve this ? For me, there are a lot of things that need to be clarified :

  1. Reading the i.MX Linux manual, section 3.3 "Timer" mentions that GPT may be used by Linux for time keeping. If this is the case, I can probably forget using it the way I want..
    => How can I check whether GPT1 is in use by Linux ?
    (I also asked Toradex, the manufacturer of the SoM I am using)
  2. I am aware of device trees and I did modify them in the project for other devices. But I cannot find any documentation that describes how to modify the gpt1 node.
    => what changes are needed to my device tree ?
    I can provide the current device tree if this helps
  3. After the two points above are successfully passed, how do I access the GPT ?
    => Is there a Linux driver similar to e.g. spidev ?

Any help is very much appreciated,

Jeroen

0 Kudos
Reply
0 Replies