ts-7000
[Top] [All Lists]

[ts-7000] Re: TS-7800 green LED woes

To:
Subject: [ts-7000] Re: TS-7800 green LED woes
From: "Harold" <>
Date: Tue, 16 Nov 2010 18:36:22 -0000
"start" is a pointer to unsigned int, which is a 4-byte data type. Therefore, 
"(start + 0x8)" is the address 0xE8000020. Try this:

volatile unsigned char *start;

--- In  "craignied" <> wrote:
>
> Any idea why the following isn't turning on the green LED on the TS-7800?  
> The user manual claims that the Lattice FPGA's core is at base physical 
> address 0xe8000000, and the green LED is bit 30 at offset 0x8 
> (http://www.embeddedarm.com/about/resource.php?item=393#appendixB) ?
> 
> 
> int main(int argc, char **argv)
> {
>       volatile unsigned int *start, *LED;
>       int fd = open("/dev/mem", O_RDWR|O_SYNC);
>       assert(fd != -1);
>       
>       start = (unsigned int *)mmap(0, getpagesize(), PROT_READ|PROT_WRITE, 
> MAP_SHARED, fd, 0xE8000000);
>       LED = (unsigned int *)(start + 0x8);
>       while( 1 )
>       {
>               *LED = 0x40000000;
>       }
> 
>       close( fd );
>       return 0;
> }
> 
> TIA,
> Craig
>




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

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