Re: [BeagleBone] Timer error in capture mode

603 views
Skip to first unread message

David

unread,
Nov 7, 2012, 5:05:12 AM11/7/12
to beagl...@googlegroups.com
ok, I found the problem.

The TIMER4 pin multiplex configuration must be set to (IEN | MODE2). I thougth this was the default setting for TIMER4 pin at board startup, but it seems that it was not the case :)

kudos to me :p

El lunes, 24 de septiembre de 2012 08:24:48 UTC+2, David escribió:

Hi all,

I have tested the DMTimer in the BeagleBone in free mode and compare mode (with direct access to the registers) and all was fine (counter was fine and interrupt was generated in compare mode).
However, I have been trying to make the DMTimer work in capture mode and I did not succeed at all. The dedicated input trigger seems not to work (no interrupt is raised, and no values are loaded into the TCAR registers). I have tried with TIMER4 (and TIMER7 later) pin in the BeagleBone.

What I need is saving the current timer value into the TCAR registers when a change/pulse in the timer dedicated input is detected.

This is my configuration:

Multiplex:
Configure dedicated pin as TIMER4 peripheral (Should not be required as this is the default configuration of BeagleBone)

Interrupts: (I suppose this should be fine, as interrupt triggers in compare mode)
Set register INTC_ILR92 to 0 (max priority)
Set bit 92%32 on INTC_MIR3 to 1 to enable interrupt

DMTimer module:
Disable timer: set TCLR to 0
Re-load 0 in overflow: set TLDR to 0
Clear initial count: set TCRR to 0
Enable interrupt: set TIMER_IRQ_CAPTURE to IRQENABLE_SET --> value = (1<<2)
Enable timer: set TIMER_START | TIMER_AUTORELOAD | TIMER_CAPTURE_RISING to TCLR --> value = 1 | (1<<1) | (1<<8)
Clear any pending associated interrupt.

As a fallback solution I am now reading the free running timer value from a GPIO interrupt handler that detects the change; however I would need the most accurate timer value possible.

Does anyone have an idea about what I am doing wrong?

Thanks in advance.

vakni...@gmail.com

unread,
Aug 14, 2013, 3:04:42 PM8/14/13
to beagl...@googlegroups.com
Hi,

can you post the code ? i'm tring to do the same thing on beaglebone and i have same problem.

i think my muxing is fine since i do :
echo 12 > /sys/kernel/debug/omap_mux/gpmc_advn_ale 
that should be same as  (IEN | MODE2)

thanks

joseph.t...@gmail.com

unread,
Sep 25, 2014, 3:01:41 PM9/25/14
to beagl...@googlegroups.com
Hi David, Yogev,

If you either of you happen to have code for enabling Timer4 I'd much appreciate taking a look. I have mux'd Timer4 to the expansion header and I've written '1' to the TCLR ST bit, but so far no dice.

Many thanks,

Joseph

akhil5mu...@gmail.com

unread,
Dec 25, 2014, 10:54:40 AM12/25/14
to beagl...@googlegroups.com
can i know how to use the timer in begleboneblack
Reply all
Reply to author
Forward
0 new messages