how to make 5mS timer in kernel in P2020 or P1011

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

how to make 5mS timer in kernel in P2020 or P1011

1,045 Views
hyoungkikim
Contributor IV

hello everyone   ( i am not good at English  )

i use P2020 and P1011  and  OS is linux 

at last time  i use CPM2 timer and  kernel driver   at linux 2.6.29, CPU was MPC8248 

but  kernel is a lot different from old one   and CPU and the way to use interurpt  are much more complex

in CPU  Reference Manual   it  says it has timers at overview section

  i am not sure  it means    Global timer  regsiters ( in Programmable interrupt contoller )

but  i have no clue  how to use it ?

do i need to change DTS file ?

in linux source code, there is  a fsl_gtm.c ( gerneral timer )  file 

could i use it  and    how could i use it ?

is there any example to use fsl_gtm ?

  

thank you in advance 

1 Reply

936 Views
Pavel
NXP Employee
NXP Employee

Look at attached snapshots and .dts file from NXP SDK 1.9 for the P2020RDB board. See also the following pages about using MPC timer:

https://github.com/mqmaker/linux/blob/master/Documentation/devicetree/bindings/powerpc/fsl/mpic-time...

 

https://github.com/torvalds/linux/blob/master/arch/powerpc/sysdev/mpic_timer.c

 

https://cregit.linuxsources.org/code/4.15/arch/powerpc/sysdev/mpic_timer.c.html

 


Have a great day,
Pavel Chubakov

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