RE: [beagleboard] Enable Timer Interrupt in Linux/U-boot for Beaglebone A3

Hi All,

I am Trying to Enable Timer interrupt for Beaglebone - A3 . I have "linux-3.1.0-psp04.06.00.03.sdk" & "u-boot-2011.09-psp04.06.00.03".

I have few queries :

1. Should i enable the Timer interrupt in U-boot or Linux ?

[Vaibhav] That depends on your requirement. Atleast as far as kernel is concerned, you have to explicitly enable the interrupts, at both level,

              - Timer module Interrupt Enable register

              - Call request_irq so that interrupt enabled at INTC level

2. In u-boot the file "board-support\u-boot-2011.09-psp04.06.00.03\arch\arm\cpu\armv7\omap-common" has defination timer_init(). should i add the following statement

     a) Timer Load value.

     b) Enable Timer

     c) Enable Compare .

     d) Start the timer.

3) I hope the initial MIR and ILR registers are written and interrupts are Enabled in U-boot.

[Hiremath, Vaibhav] I am quite not sure about it.

4) The next thing i need to do is write a code to toggle GPIO in timer_isr.

5) I have gone through an Example in "board-support\u-boot-2011.09-psp04.06.00.03\arch\arm\cpu\arm720t" where i can see the interrupt handler installed . should i follow the same thing to load the ISR_handler address.

[Hiremath, Vaibhav] You are looking at wrong example, arm720t is not meant for our CPU.

I am not sure about the Linux files to be changed.

[Hiremath, Vaibhav] Timer is exported as a kernel API, you can refer to the file <kernel home>/arch/arm/plat-omap/dmtimer.c. This file has all the API’s required in order to use DMTimer module.

I am Expecting for Small pointer towards the istallation of the handler process and Modifications to be done.

[Hiremath, Vaibhav] You have to understand the code by yourself here :slight_smile:
Another pointer I can provide you is to refer wiki page section “DM Timer wakeup<'s_Guide> “

Thanking u all in advance and Expecting for few pointers