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