Description of the LPC11xx Example Software Package, NXP Semiconductor
https://github.com/Mrjohns42/RSL/tree/master/lpc11xx.keil-examples-CMSIS-update_2/lpc11xx.keil-examples-CMSIS-update
...
The Description of the Example software
This example demonstrates the use of build-in peripherals on the NXP
LPC11xx family microcontrollers.
The Example software includes, common library, peripheral APIs, and test modules
for the APIs.
The common library include startup file, standard definition and
header files, processor specific setup module, generic interrupt related APIs,
timer routine.
The peripheral directories include, ADC, GPIO, timer, SPI, I2C,
Watchdog timer, UART, external interrupt, various USB class drivers ,etc.
Depending on the configuration of LPC11xx, it may include a CAN controller
or a USB Device controller, or none of them. The header file of register
definition, LPC11xx.h, the clock configuration, and the NVIC APIs, includes
both CAN and USB, but may not apply to the MCU you are using.
The development environment is Keil's, an ARM company now, uVision MDK 3.85
or later, and ULINK2 ICE. The target boards is NXP Internal Eval board with
LPC11xx MCU on it.
Please note that, the latest Keil MDK may or may not include the startup file,
the header files, and Cortex related API files for NVIC and Systick driver. These
files are also included in our common library. If the users wish not to use Keil
MDK, the compiler needs to:
(1) set up the include path to COMMON/INC
(2) change #include <lpc11xx.h> to "#include "lpc11xx.h" where is located
under COMMON/INC directory.
(3) Add "core_cm0.c" from COMMON/SRC into your own project.
The project is created for both target option "FLASH(Release)" and "RAM(Debug)".
For "FLASH", the image code can be programmed into the flash and executed;
for "RAM", the image code can be loaded into internal SRAM(IRAM)
for easy debugging. The "RAM.ini" in each directory is a Keil uVision debugger
script file, once the debugger starts, the code will be loaded to the IRAM
first, then, "RAM.ini" will be executed and reset program counter(PC) to
0x10000000(IRAM starting address) that code will be executed from.
For Flash Update, a FLM file for Keil MDK built-n flash utility is included if
the revision of Keil MDK you have doesn't support LPC11xx yet. If the LPC11xx
is not listed in the Keil MDK Device Database, choose "Cortex M0" as shown in
our example project file, then, copy the file "LPC_IAP_CD0_32.FLM" from Sample Code
Bundle Root directory to "C:\Keil\ARM\Flash". Now, you go to "Options/Utilities/Flash
Programming Setting", add "LPC114x IAP 32kB Flash" from a list of flash algorithm,
and use the Keil Built-in flash utility to program the flash.
Some external components, such as I2C temperature, SPI serial EEPROM, will be
required to add on the board in order to complete the test below.
Known problems:
(1) Keil MDK configuration Wizard has not been tested for Clock configuration.
(2) When using Flash download, at the end of the flash update, GUI shows
"Error: Flash download failed, Cortex M0". although, the flash has been updated
correctly. So, this message should be ignored. It depends on the revision of the
Keil MDK you use. For MDK with LPC11xx support, this shouldn't be an issue.
The directory tree and content of the sample software
common
-- inc
-- lpc11xx.h CMSIS Cortex-M0 Core Peripheral Access Layer Header
File for NXP LPC11xx Device Series
-- core_cm0.h CMSIS Cortex-M0 Core Peripheral Access Layer Header
File
-- system_LPC11xx.h CMSIS Cortex-M0 Device Peripheral Access Layer
Header File for the NXP LPC11xx Device Series
-- type.h Type definition Header file for NXP LPC11xx Family
-- systick.h Cortex M0 Systemtick header and definition
-- gpio.h GPIO setting and I/O pin connfigured as external
interrupt definition
-- uart.h UART setting header and definiton
-- timer16.h 16-bit TIMER setting header and definition
-- timer32.h 32-bit TIMER setting header and definition
-- clkconfig.h clock configuration header and definition
-- src
-- core_cm0.c CMSIS Cortex-M0 Core Peripheral Access Layer Source
File
-- startup_LPC11xx.s CMSIS Cortex-M0 Core Device Startup File
for the NXP LPC11xx Device Series
-- system_LPC11xx.c CMSIS Cortex-M0 Device Peripheral Access Layer
Source File for the NXP LPC11xx Device Series
-- gpio.c GPIO setting APIs and I/O pin connfigured as
external interrupt and interrupt handler
-- uart.c UART setting API and interrupt handler
-- timer16.c 16-bit TIMER setting APIs and interrupt handler
-- timer32.c 32-bit TIMER setting APIs and interrupt handler
-- clkconfig.c Misc. clock configuration setting and APIs in
addition to system_lpc11xx.c
Blinky
-- blinky.c General test, GPIO, Timer and NVIC test module,
note:
API modules are in the COMMON directory and
shared and used by some other peripheral testing.
-- blinky.uvproj uVision 4.x project file
ADC
-- adc.h ADC header
-- adc.c ADC APIs
-- adctest.c ADC controller test module
-- adc.uvproj uVision 4.x project file
GPIO
-- gpiotest.c External interrupt test module, APIs are
from COMMON directory
-- gpio.uvproj uVision 4.x project file
Systick
-- systick.c ARM Cortext M0 Core system tick test module, APIs
are from COMMON directory
-- systick.uvproj uVision 4.x project file
I2C
-- i2c.h I2C header
-- i2c.c I2C APIs
-- i2ctest.c I2C test module
-- i2ctest.uvproj uVision 4.x project file
I2CSlave
-- i2cslave.h I2C slave header
-- i2cslave.c I2C slave APIs
-- i2cslvtst.c I2C slave test module
-- i2cslave.uvproj uVision 4.x project file
Timer32
-- timer32test.c 32-bit Timer test module, note: API modules
are in the COMMON directory and
shared and used by some other peripheral testing.
-- timer32.uvproj uVision 4.x project file
PWM
-- pwmtest.c PWM test module, note: PWM API modules
are in the COMMON directory, shared and used
by some other peripheral testing.
-- pwm.uvproj uVision 4.x project file
UART
-- uarttest.c UART test module, note: UART API modules
are in the COMMON directory, shared and used
by some other peripheral testing.
-- uart.uvproj uVision 4.x project file
RS485
-- rs485.h RS485 header
-- rs485.c RS485 APIs
-- rs485test.c RS485 test module
-- rs485.uvproj uVision 4.x project file
WDT
-- wdt.h Watchdog timer header
-- wdt.c Watchdog timer APIs
-- wdttest.c Watchdog timer test module
-- wdt.uvproj uVision 4.x project file
CAN
-- can.h CAN header
-- can.c CAN APIs
-- cantest.c CAN test module
-- can.uvproj uVision 4.x project file
CAN on_chip
-- rom_driver_CAN.h CAN on-chip API function header
-- rom_drivers.h ROM drivers header
-- main.c CAN on-chip test module
-- CAN on_chip.uvproj uVision 4.x project file
CANopen on_chip
-- rom_driver_CAN.h CAN on-chip API function header
-- rom_drivers.h ROM drivers header
-- main.c CAN on-chip test module
-- CANopen on_chip.uvproj uVision 4.x proje
.END
No comments:
Post a Comment