ts-7000
[Top] [All Lists]

Re: [ts-7000] TS 7200 SPI Driver, memory access

To:
Subject: Re: [ts-7000] TS 7200 SPI Driver, memory access
From: Peter Gammie <>
Date: Fri, 22 Jan 2010 15:58:29 +1100
On 22/01/2010, at 3:51 PM, cheezy072000 wrote:

> I am trying to write code to initialize the SSP registers for the 4-step 
> algorithm described in the user manual and in the Tempsensor.c file on the 
> ftp repository.
> 
> I am trying to set the enable bit, SSE, in the SSPCR1 register by accessing 
> the register (0x808A0004) and then would like to store/write 0x10 to this 
> location in memory. Instead of using the POKE32 function (because my system 
> is complaining about the inline assembly at compilation time), I am trying 
> the following: 
> 
> REG_ADDR = BASE_ADDR + OFFSET; 
> *(unsigned long*)REG_ADDR |= (0x10);
> 
> This compiles but gives a "segmentation fault" error at run time.

I am not an expert, but Jim Jackson's code works for me.

http://www.comp.leeds.ac.uk/jj/linux/arm-sbc.html#TS7200%20Software

Perhaps the link he provides will give you enough background to solve this 
problem - you need to do some mmap'ery first. I used the Sourcecodery GCC for 
GNU/Linux on ARM, which appears to work fine if fed the appropriate CPU 
sub-arch flag.

Actually, I borrowed some code from his ts_arm_util, which I cannot find a link 
for... perhaps adio is the same thing?

cheers
peter

-- 
http://peteg.org/



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

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