LPC General

From Wiki at Neela Nurseries
Jump to: navigation, search

LPC General
NXP LPC microcontroller libraries and coding framework
2019-05-09 Thusday



OVERVIEW

Wiki article to capture NXP LPC family microcontroller code libraries and coding framework details


^ LPC_SYSCON Register Data Structure

Ok, in bringing in NXP Example Code Bundle for LPC8xx family controllers, IAR compiler complains of data member not found for structure LPC_SYSCON. By its name this looks like a wide ranging, covers-lots-of-settings data structure. We need to find where this data structure is defined in library and shared, system code referenced by our LPC804 targeted firmware project . . . this file looks promising:


 ./arm/8.22.2/NXP/LPC8xx/LPCXpresso/simple/Common/inc/LPC8xx.h:186:} LPC_SYSCON_TypeDef;


similar lines appear in:


 ./Common/inc/LPC8xx.h:186:} LPC_SYSCON_TypeDef;


and in this file too:


  ./examples/Source_Code/common/inc/LPC8xx.h


- 2019-05-13 Monday -

The first and last of the LPC8xx header files above are identical, and have the younger cerca 2014 datestamp. Only the older, middle header file under the examples directory, however, has the LPC_SYSCON data member named UART0CLKSEL. There doesn't appear to be any data member which directly maps to this clock selecting bit or register in the newer header files. This is disconcerting given that both versions of the header file are named for one and the same NXP microcontroller, and even the first comment blocks top of these two files describe them as being written for this purpose . . .

In addition to NXP part header file LPC8xx.h, the header syscon.h also has some control register definitions . . .


^ Key register defines

$ grep -nr LPC_IOCON_BASE ./* | grep define | grep LPC_IOCON_BASE
./Common/inc/LPC8xx.h:638:#define LPC_IOCON_BASE        (LPC_APB0_BASE + 0x44000)
./Common/inc/LPC8xx.h:667:#define LPC_IOCON             ((LPC_IOCON_TypeDef  *) LPC_IOCON_BASE )
./arm/8.22.2/NXP/LPC8xx/LPCXpresso/simple/Common/inc/LPC8xx.h:638:#define LPC_IOCON_BASE        (LPC_APB0_BASE + 0x44000)
./arm/8.22.2/NXP/LPC8xx/LPCXpresso/simple/Common/inc/LPC8xx.h:667:#define LPC_IOCON             ((LPC_IOCON_TypeDef  *) LPC_IOCON_BASE )
./examples/Source_Code/common/inc/LPC8xx.h:701:#define LPC_IOCON_BASE         (LPC_APB0_BASE + 0x44000)
./examples/Source_Code/common/inc/LPC8xx.h:737:#define LPC_IOCON


^ References

FreeRTOS and UART related references:



- - - top of page - - -