![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
Example description
This example blinks LED1 and LED2 at various rates, one of the LED is turned on/off by M4 based on message received from M0. Meanwhile M4 also sends blink message to M0 so that M0 core blinks the other LED. LED1 will blink at the rate of 500ms/blink, LED2 will blink at the rate of 1s/blink.
This example is included by default in all other dual-core examples, hence all the dual-core examples will blink LED1 and LED2.
IMPORTANT NOTE:
M0 image boot failure will also cause (by default) LED2 to blink. This should not be confused with the Blinky task blinking the LED. The error blink will be at 20ms or 2s rate, the former rate indicates that the M0 image loader code running on core-M4 could not locate a valid M0 image, whereas the latter rate indicates that a valid M0 image is found but its functionality is mutually exclusive with the functionalities of the image running in core-M4. In case of M0 boot error the blink will stop after 1 minute.
Special connection requirements
Build procedures:
LPC18xx/43xx example quickstart for Keil uVision4
LPC18xx/43xx example quickstart for IAR EWARM
LPC18xx/43xx example quickstart for Code Red Xpresso
Supported boards and board setup:
Hitex 1850 evaluation boards
Hitex 4350 evaluation boards
Keil 1857 evaluation boards
Keil 4357 evaluation boards
NGX 1830 Xplorer boards
NGX 4330 Xplorer boards
Submitting LPCOpen issues:
Community support for LPCOpen
Functions | |
| static void | LED_Event_Task (void *loop) |
| static int | blink_delay (void) |
| static void | LED_blinkProc (uint32_t val) |
| void | blinky_tasks (void) |
| Dual core blinky task. | |
| void | BLINKY_Init (void) |
| Dual core Blinky example initialization. | |
Variables | |
| static const uint32_t | xDelay = BLINKY_DEFAULT_DELAY |
|
static |
Definition at line 143 of file dualcore_blinky.c.
| void BLINKY_Init | ( | void | ) |
Dual core Blinky example initialization.
This function will register the blink function to the event queue of a Core (M0/M4). Whenever a blink event is received from the other core the registered call-back function will be called-back by the ipcex_task(), This function is called by main() only when EXAMPLE_BLINKY is defined. In all the dual core examples EXAMPLE_BLINKY is defined by default.
Definition at line 237 of file dualcore_blinky.c.
| void blinky_tasks | ( | void | ) |
Dual core blinky task.
Calling this function calls the blinky task in which will blink the LEDs. When no OS is specified this will be repeatedly called from dual core main() or once if any OS is defined, only when EXAMPLE_BLINKY is defined. In all the dual core examples EXAMPLE_BLINKY is defined by default.
Definition at line 230 of file dualcore_blinky.c.
|
static |
Definition at line 164 of file dualcore_blinky.c.
|
static |
Definition at line 173 of file dualcore_blinky.c.
|
static |
Definition at line 107 of file dualcore_blinky.c.