lpcware

Xpresso Examples

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Brutte on Sun Apr 01 11:24:28 MST 2012
Welcome.
I would like to post some questions regarding examples provided  (LPCXpresso 4.1.5) in here.

[B]Q1:[/B] Solved[INDENT] File "system_LPC17xx.c", line 503:
while (!(LPC_SC->PLL0STAT & ((1<<25) | (1<<24))));/* Wait for PLLC0_STAT & PLLE0_STAT */
This loop is supposed to poll both bits to make sure PLL0 is locked and ready:

Quote: LPC17xx User manual, rev. 2
When PLLC0 and PLLE0 are both one, PLL0 is connected as the clock source for the CPU. When either PLLC0 or PLLE0 is zero, PLL0 is bypassed.


The code does not match the comment/manual or I got it wrong?
[/INDENT][B]Q2: [/B]Pending[INDENT]I do not understand "reserved" bitfields' descriptions (I do not get the subtle differences among those), LPC17XX UM, rev. 2, here I give some examples of those descriptions:[INDENT]a) "Reserved. The value read from a reserved bit is not defined."
b) "Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined."
c) "Reserved. User software should not write ones to reserved bits. These bits read always back as zeroes"
d) "Reserved, and must be written as 0"
e) "Reserved for Debug use. This bit reads as 0. When writing to the register you must write 0 to this bit, otherwise behavior is Unpredictable."
f) "Reserved."
[/INDENT]A Glossary definition of "Reserved" term from the same UM:
"Reserved — A field in a control register or instruction format is reserved if the field is to be defined by the implementation, or produces Unpredictable results if the contents of the field are not zero. These fields are reserved for use in future extensions of the architecture or are implementation-specific. All reserved bits not used by the implementation must be written as 0 and read as 0."

Could someone give a reference on the differences of (a-f)?
LPCXpresso examples are inconsistent w.r.t. the subject..
[/INDENT]

Outcomes