Yahoo Groups archive

Lpc2000

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

Message

Re: pll configuration problem

2004-07-09 by johnnorgaard2003

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

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.