ts-7000
[Top] [All Lists]

[ts-7000] Re: Interrupt Handlers

To:
Subject: [ts-7000] Re: Interrupt Handlers
From: "Matt Godbolt" <>
Date: Thu, 14 Sep 2006 07:03:55 -0000
--- In  "weide72" <> wrote:
>
> I am trying to use the timer 3 interrupt running in periodic mode to 
> record data every X minutes. I have set up the timer and interrupts 
> correctly.  When the timer reaches 0, I can tell an interrupt has 
> occured but it freezes becuase I don't know how to address the 
> interrupt handler that actually does the data recording properly.  I 
> am not sure what registers to use:
> 
> VICxVectAddr, VICxDefVecAddr, VICxVectAddr0-15, and VICxVectCtrl0-15.
> 
> I have looked at the GPIO's interrupt on Andy Gryc's gps_pps.tgz on 
> this site but am still not getting it. Can anyone shed some light on 
> this.

First up, if you need to check something every X minutes, then I'd
suggest using alarm() and/or just sleep() in a user-mode piece of code
rather than mucking about with interrupts.  Unless the timing has to
be ultra-exact, or you need to take measurements very very often, it's
always easier to write and debug a user mode piece of code.

However, if you do need to write an interrupt handler, then you'll
need to acquire the interrupt, associate a handler routine with it,
and deal with it, all in a kernel module.  The gps_ppz.tgz you mention
was the best tutorial I could find when I wrote an interrupt handler -
specifically what aspects do you need help with?  From your email you
seem a little confused about how one sets up the interrupt vectors: In
linux you don't directly, instead linux has its own interrupt handlers
and you chain onto its list of 'interested parties' with request_irq
(http://hegel.ittc.ku.edu/topics/linux/man-pages/man9/request_irq.9.html).
 In this, the interrupt numbers are as mentioned in the Linux source
(in linux/include/asm-arm/arch-ep93xx/irqs.h), where you'll see
IRQ_TIMER3 is defined as 51.

If you're not familiar with the linux kernel architecture I recommend
you spend some time reading and understanding the gps_ppz code, it's a
well-written example of doing something similar to what you want to
achieve.  However I must reiterate that it's much easier to write this
code in user space if you possibly can.






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU