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/
|