--- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@h...> wrote:
> Hi John
>
> How and why can you make a char pointer to a long address ?
>
> #define MAMCR (*(volatile unsigned char *)0xe01fc000)
>
> Will writing MAMCR=0x01; make the "pointer" write: 0xe01fc001 ?
>
> Best regards
> lasse madsen
>
> -----Oprindelig meddelelse-----
> Fra: johnnorgaard2003 [mailto:john_2005@c...]
> Sendt: 9. juli 2004 11:15
> Til: lpc2000@yahoogroups.com
> Emne: [lpc2000] Re: pll configuration problem
>
>
> --- In lpc2000@yahoogroups.com, Robert Adsett <subscriptions@a...>
> wrote:
> > At 02:28 PM 7/8/04 -0700, you wrote:
> > >hi Robert,
> > > >>uart0 interrupt is enabled in startup.s section of
> > >the code.
> > >and i am setting the Pll configuration in main which
> > >is executed later
> >
> > That might be a problem. The pll_load writes must me successive
> writes so
> > if an interrupt were to occur between writes the update would
> fail. I
> > think I'd expect your symptoms to be more intermittent though.
> nonetheless
> > I'd disable interrupts while you are updating the pll (actually
I'd
> disable
> > them for the whole routine). That's a problem but probably not
the
> problem.
> >
> >
> > > >>the REG defination is as below
> > >#define REG(addr) (*(volatile unsigned long*)(addr))
> >
> > I don't believe it's an ANSI compliant lvalue (IE it's not
allowed
> to
> > assign to it), but compilers that support it as an lvalue should
do
> the
> > logical thing.
> >
> > 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
>
> Hi
>
> Maybe the problem is the define of REG. It should not always be
long.
>
> /* Memory Accelerator Module (MAM) */
> #define MAMCR (*(volatile unsigned char *)0xe01fc000)
> #define MAMTIM (*(volatile unsigned char *)0xe01fc004)
> #define MEMMAP (*(volatile unsigned char *)0xe01fc040)
>
>
> /* Phase Locked Loop (PLL) */
> #define PLLCON (*(volatile unsigned char *)0xe01fc080)
> #define PLLCFG (*(volatile unsigned char *)0xe01fc084)
> #define PLLSTAT (*(volatile unsigned short *)0xe01fc088)
> #define PLLFEED (*(volatile unsigned char *)0xe01fc08c)
> #define PCON (*(volatile unsigned char *)0xe01fc0c0)
> #define PCONP (*(volatile unsigned long *)0xe01fc0c4)
>
> John
>
>
>
>
>
>
> Yahoo! Groups Links
Hej Lasse
No all the pointers are long, but what the point to is char, short
int or long.
See keil register defines.
http://www.keil.com/dd/docs/arm/philips/lpc210x.h
Some register bit of LPC210x is unused and you should write 00.
Best regards
John