ts-7000
[Top] [All Lists]

Re: [ts-7000] IRQ on DIO with TS-7400

To:
Subject: Re: [ts-7000] IRQ on DIO with TS-7400
From: Colin Copeland <>
Date: Sun, 22 Apr 2007 15:47:06 -0400
Hey guys,

I noticed I was setting the wrong bit on the TS-7400 control  
register. Doing a peek8 on the control register looks good now:

:eeapnode# peek8 0x12000000
0x2

Here's my updated kernel module code:
http://cs.earlham.edu/~eeap/cvsweb/cvsweb.cgi/eeapnode/module/ 
eeapnode.c?rev=1.2

But, I'm still failing to receive any interrupts on DIO 11. /proc/ 
interrupts and /proc/stat never record interrupts on IRQ 33.

Hey, I forgot to thank you Eddie in my last message, but your pointer  
to the end of the documentation was a big help.

Any ideas?

   colin

On Apr 20, 2007, at 2:23 PM, Colin Copeland wrote:

> I've tried to write a module to catch interrupts on DIO_11, my code
> is here:
> http://cs.earlham.edu/~eeap/cvsweb/cvsweb.cgi/eeapnode/module/
> eeapnode.c?rev=1.1
>
> I have a switch to test the pulses, which goes 3.3V high when I flip
> it. It's connected to DIO_11. But I never recieve an interrupt, and /
> proc/stat doesn't show any occurring on IRQ 33.
>
> :eeapnode# insmod -f eeapnode.o
>
> dmesg:
> ...
> eeapnode: /proc/eeapnode created
> eeapnode: control pointer acquired (c604f000)
> eeapnode: control = 0
> eeapnode: setting external IRQ on DIO_11
> eeapnode: control = 1
>
> :eeapnode# cat /proc/interrupts
>    4:      55191   timer
> 33:          0   eeapnode   <-----
> 39:        475   EP9312_Eth
> 52:       4132   amba
> 54:         12   amba
> 56:          0   usb-ohci
> Err:          0
>
> * flipping switch back and forth a couple of times *
>
> :eeapnode# cat /proc/stat
> cpu  1386 0 9542 46913
> cpu0 1386 0 9542 46913
> page 99869 300
> swap 0 0
> intr 62506 0 0 0 0 57841 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 521 0 0 0 0 0 0 0 0 0 0 0 0 4132 0 12 0 0 0 0
> 0 0 0 0 0
> disk_io:
> ctxt 3530
> btime 1177092065
> processes 391
>
> rmmod, dmesg:
> eeapnode: cleanup
> eeapnode: control = 1
> eeapnode: unsetting external IRQ on DIO_11
> eeapnode: control = 0
> eeapnode: /proc/eeapnode removed
>
> I have some user space code that polls DIO_11 using mmap, which shows
> the pin going high when I flip the switch. Not sure what I'm doing
> wrong. Any ideas?
>    colin
>
> On Apr 19, 2007, at 11:56 AM, Eddie Dawydiuk wrote:
>
>> Hello,
>>
>>> But I'm not sure what irq to ask for with request_irq() in my kernel
>>> module.
>>> Does anyone know?
>>
>> At the end of the TS-7400 documentation your question is answered.
>>
>> "If you choose to use DMA or IRQ support for the GPBUS, you will
>> likely want to write a kernel driver.  Simple userspace applications
>> can not directly set up interrupt handler functions or translate
>> the virtual addresses of process data structures to the physical
>> addresses needed by the DMA controller.  When writing a kernel
>> driver in C, one should be aware of certain details:
>>    *) To set a handler on the GPBUS IRQ, you must request IRQ #33 and
>>       allow IRQ sharing (the UART and SD drivers also generate the
>>       same IRQ).  This means calling the request_irq() kernel  
>> function
>>       with SA_SHIRQ in the 'flags' parameter.
>>    *) To use DMA, you must manipulate the M2M1 EP9302 DMA channel.
>> Details
>>       on its programming can be found in the EP9301 CPU User Manual
>> from
>>       Cirrus Logic at http://www.cirrus.com
>>    *) To access various registers in arbitrary physical address  
>> space,
>> use
>>       the __ioremap() function and not the ioremap() kernel function.
>>       ioremap() does not expect physical addresses and will apply an
>> offset
>>       to your requested address on the EP9302 ARM Linux kernel.
>>    *) If you are unable to write a driver yourself, you may consider
>>       contracting Technologic Systems to write one for you.  Often
>> times,
>>       TS engineers can accomodate your requirements for less cost
>> than it
>>       takes to accomplish internally."
>>
>> Best Regards,
>> ______________________________________________________________
>>   Eddie Dawydiuk, Technologic Systems | voice:  (480) 837-5200
>>   16610 East Laser Drive Suite 10     | fax:    (480) 837-5300
>>   Fountain Hills, AZ 85268            | web: www.embeddedARM.com
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>
>
>
>
> Yahoo! Groups Links
>
>
>



 
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