ts-7000
[Top] [All Lists]

[ts-7000] IRQ 7/40 disabling

To:
Subject: [ts-7000] IRQ 7/40 disabling
From: "Clark" <>
Date: Fri, 08 Apr 2011 20:50:57 -0000
Trying to get a 1PPS GPS interrupt going on IRQ7/40 for TS7260!
We read all the notes in EP9301 User's Guide, in particular
the bottom of page 525 seems important.  We have been inspecting
the driver's results using a user-space mapping of /dev/mem,
but now we have simplified, we use the /dev/mem technique sans
the driver and the interrupt keeps getting disabled!?

Simple user space code:

    int val = 0x00000004, cuz;
    int fd = open("/dev/mem", O_RDWR|O_SYNC);
    gpio_ptr = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 
0x80840000);

    PFDR = (unsigned int *)(gpio_ptr + 0x30);     // port f data register
    PFDDR = (unsigned int *)(gpio_ptr + 0x34);    // port f direction register
    GPIOFIntEn = (unsigned int *)(gpio_ptr + 0x58);
    GPIOFIntType1 = (unsigned int *)(gpio_ptr + 0x4C);
    GPIOFIntType2 = (unsigned int *)(gpio_ptr + 0x50);
    GPIOFDB = (unsigned int *)(gpio_ptr + 0x64);  // debounce on port f

    /* Exactly as given on pp 525 */
    cuz = *GPIOFIntEn; cuz &= ~val; *GPIOFIntEn = cuz;
    cuz = *PFDDR; cuz &= ~val; *PFDDR = cuz;
    cuz = *GPIOFIntType1; cuz  |= val; *GPIOFIntType1 = cuz;
    cuz = *GPIOFIntType2; cuz |= val; *GPIOFIntType2 = cuz;
    cuz = *GPIOFIntEn; cuz |= val; *GPIOFIntEn = cuz;

    printf( "Aft: PFDR=0x%x PFDDR=0x%x GPIOFDB=0x%x GPIOFIntEn=0x%x 
GPIOFIntType1=0x%x GPIOFIntType2=0x%x\n", *PFDR, *PFDDR, *GPIOFDB, *GPIOFIntEn, 
*GPIOFIntType1, *GPIOFIntType2 );
___________________________
    
The first time it runs, we achieve nada:

Aft: PFDR=0xff PFDDR=0x0 GPIOFDB=0x0 GPIOFIntEn=0x0 GPIOFIntType1=0x0 
GPIOFIntType2=0x0

But the second time it runs immediately after, we get:

Aft: PFDR=0xff PFDDR=0x0 GPIOFDB=0x0 GPIOFIntEn=0x4 GPIOFIntType1=0x4 
GPIOFIntType2=0x4

Now this looks good! But when we run the /dev/mem reader immediately following 
that, we get: 

PFDR=0xff PFDDR=0x0 GPIOFDB=0x0 GPIOFIntEn=0x0 GPIOFIntType1=0x0 
GPIOFIntType2=0x0

Disabled by what?  This is Matthieu's stock 2.6.29.1, lsmod: 8250, tsscard, 
rtc_ep93xx, the rest the usual suspects.  

Any ideas?  Thanks



------------------------------------

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