ts-7000
[Top] [All Lists]

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

To:
Subject: [ts-7000] TS 7200 SPI Driver, memory access
From: "cheezy072000" <>
Date: Fri, 22 Jan 2010 04:51:14 -0000
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.

Is there any way to get around this? Is there an alternate method for writing 
to the address location with different syntax? OR should I get a different 
compiler to get peekpoke.h and peekpoke.c to compile?  I am using gcc right 
now.  

Thanks in advance for any help!



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

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