HAL Port — Implementation Details
This documentation explains how the eCos HAL specification has been mapped onto the phyCORE LPC2294 Board hardware, and should be read in conjunction with that specification. The phyCORE LPC229x platform HAL package complements the ARM architectural HAL and the LPC2xxx variant HAL. It provides functionality which is specific to the target board.
Following a hard or soft reset the HAL will initialize or reinitialize many of the on-chip peripherals. This includes the PINSEL functions and LED bank. There is an exception for RAM startup applications which depend on a ROM monitor for certain services.
For ROM startup, the HAL will perform additional initialization,
programming the various internal registers including PLL (for the
clocks); Memory Mapping control registers to map SRAM to 0x0; the
memory controller for access to external FLASH, SRAM and ethernet; and
the Memory Acceleration Module (MAM). The details of the early
hardware startup may be found in the header
The LEDs may be accessed from C with the following function:
#include <cyg/infra/hal_diag.h> extern void hal_diag_led(int leds);
Values from 0 to 16 will be displayed on the LED bank representing the binary value with 1 being on and 0 being off, and with P0.7 being the MSB, and P0.4 the LSB.
The LEDs are also used during platform initialization and only P0.4 should be illuminated if booting has been successful. Other LED indications represent the stage in the initialization process that failed.
|2022-03-29||eCosPro Non-Commercial Public License|