ts-7000
[Top] [All Lists]

Re: [ts-7000] Interrupt of TS7200 DIO pin 8 [port F bit 1]

To:
Subject: Re: [ts-7000] Interrupt of TS7200 DIO pin 8 [port F bit 1]
From: Jim Jackson <>
Date: Fri, 21 Dec 2007 18:45:52 +0000 (GMT)


On Fri, 21 Dec 2007, yaco2k wrote:

> Hello...
> I am working on my graduation project [JUST mobile].. but i am stuck
> with the keypad interrupt..
>
> i have a 16-keys key pad connected to the DIO interface of TS7200
> pins [0-3] , and i have a data ready interrupt signal from the
> keypad connected to pin 8 of the DIO which is on port F bit 1.
>
> I can read from the keypad ,but when I tried to create a program to
> test the interrupt i had some complications, if any body has some
> ideas to share i will be thankfull.
> *************
> *************
>
> here is a link to the c code...
>
> http://www.geocities.com/just2007mobile/jkey3.c

This looks like a userspace program. AFAIK you can only do interupt
handling in the Kernel, using a suitable kernel driver.

Why don't you just poll and forget interrupts?

>
> *************
> *************
> The code is based on chapter 5 (Vectored Interrupt Controller),and
> chapter 21 (GPIO Interface) of the EP9301 User's Manual.
>
> The code simply has an infinite loop in the main Method of the
> program that prints the status of the portB,portF and the VIC
> registers.The expected output from this program is to call another
> Method [PFIntHandler()] when a key is pressed.
>
> please note the following :
>
> In the manuals DIO_8 on port F is bit 1 which is interrupt sourse
> number 21[GPIO1INTR] of VIC1. but when i press a key on my key pad,
> the raw int sts reg indicates that interrupt source 20[GPIO0INTR] is
> changed instead !!!.so i decided to use Int source 20 for DIO_8 pin.
>
> I have enabled the Interrupt source 20 ,selected it as an IRQ,linked
> it to vector 0 and gave it a Vector address.But the problem I am
> facing is that the raw_sts_reg of vic1 indicates an interrupt from
> source 20 but the IRQ_sts_reg does not, and eventaly the interrupt
> handler is not invoked.
>
> also after  i press the key the first time the interrupt enable
> becomes 0 for the pin (i dont know why!!!)
>
> this is a sample output from my test program :
> ____START________START________START________START_____
>
> =================main method Block=================
> DIO data                :        0x 0
> ***----------------Port F regs----------------***
> Port F DR               :        0x 0
> Port F Int sts          :        0x 0
> Port F Int raw sts      :        0x 2
> *************************************************
> ***------------------VIC regs-----------------***
> VIC IRQ sts             :        0x 0
> VIC FIQ sts             :        0x 0
> VIC select reg          :        0x 0
> VIC enable reg          :        0x 10
> VIC *v1 V00 ctrl        :        0x 0
> *v1VA00Ptr              :        0x 0
> VIC raw Int sts         :        0x 10000008
> *************************************************
>
>
>
> %%%%%%%%%%____init____%%%%%%%%%
>
>
> DIO data                :        0x 0
> ***----------------Port F regs----------------***
> Port F DR               :        0x 0
> Port F Int sts          :        0x 0
> Port F Int raw sts      :        0x 0
> *************************************************
> ***------------------VIC regs-----------------***
> VIC IRQ sts             :        0x 0
> VIC FIQ sts             :        0x 0
> VIC select reg          :        0x 0
> VIC enable reg          :        0x 100010
> VIC *v1 V00 ctrl        :        0x 34
> *v1VA00Ptr              :        0x 8cbc
> VIC raw Int sts         :        0x 10000008
> *************************************************
>
> =====================================================
>
>
>
> PFIntHandler addr : 0x 8cbc
>
>
> ____LOOP________LOOP________LOOP________LOOP_____
>
> ================main method Block================
> DIO data                :        0x 0
> ***----------------Port F regs----------------***
> Port F DR               :        0x 0
> Port F Int sts          :        0x 0
> Port F Int raw sts      :        0x 0
> *************************************************
> ***------------------VIC regs-----------------***
> VIC IRQ sts             :        0x 0
> VIC FIQ sts             :        0x 0
> VIC select reg          :        0x 0
> VIC enable reg          :        0x 100010
> VIC *v1 V00 ctrl        :        0x 34
> *v1VA00Ptr              :        0x 8cbc
> VIC raw Int sts         :        0x 10000008
> *************************************************
> ===================================================
>
> ================main method Block================
> DIO data                :        0x 6
> ***----------------Port F regs----------------***
> Port F DR               :        0x 2
> Port F Int sts          :        0x 2
> Port F Int raw sts      :        0x 2
> *************************************************
> ***------------------VIC regs-----------------***
> VIC IRQ sts             :        0x 0
> VIC FIQ sts             :        0x 0
> VIC select reg          :        0x 0
> VIC enable reg          :        0x 10
> VIC *v1 V00 ctrl        :        0x 34
> *v1VA00Ptr              :        0x 8cbc
> VIC raw Int sts         :        0x 10100008
> *************************************************
> ===================================================
>
>
> ================main method Block================
> DIO data                :        0x 6
> ***----------------Port F regs----------------***
> Port F DR               :        0x 0
> Port F Int sts          :        0x 2
> Port F Int raw sts      :        0x 2
> *************************************************
> ***------------------VIC regs-----------------***
> VIC IRQ sts             :        0x 0
> VIC FIQ sts             :        0x 0
> VIC select reg          :        0x 0
> VIC enable reg          :        0x 10
> VIC *v1 V00 ctrl        :        0x 34
> *v1VA00Ptr              :        0x 8cbc
> VIC raw Int sts         :        0x 10100008
> *************************************************
> ===================================================
>
>


 
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