Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] accessing SPI registers

2005-05-26 by Robert Adsett

At 11:54 AM 5/26/05 +1000, Bruce Paterson wrote:
>Robert Adsett wrote:
>
> > You can see this in the newlib-lpc source.
>
>Incidentally Robert, I had to add a couple of volatiles to the
>newlib-lpc lpx2XXX.h file in my case where you'd left them out (but most
>registers had them). Probably for a case you weren't expecting, but I
>was re-programming PINSEL registers before sleeping.
>
>Gcc had done a trick of moving the updates around since not specified
>volatile and of course it had weird (and non-obvious) results. Only
>found the problem eventually by looking at the assembly code.
>
>May be worth having a thought experiment on any other non-volatile
>registers specified.

Your right.  It probably would be.  I try to put them in only where 
necessary.  It's probably worth a check to make sure const is in there as 
often as possible as well.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.