LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
LPC43xx dual core common code

Modules

 LPC43xx Inter Processor Communication(IPC) functions
 
 LPC43xx M0 Image loader
 
 LPC43xx startup code for dual-core demos
 

Functions

void IPCEX_Init (void)
 IPC Example initialization.
 
void USBHOST_Init (void)
 USB Host example initialization.
 
void USBDEV_Init (void)
 USB Device example initialization.
 
void LWIP_Init (void)
 lwIP dual core example initialisation function
 
void EMWIN_Init (void)
 emWin dual core example initialisation function
 
void BLINKY_Init (void)
 Dual core Blinky example initialization.
 
void ipcex_tasks (void)
 Dual Core IPC example implementation task.
 
void blinky_tasks (void)
 Dual core blinky task.
 
void usb_host_tasks (void)
 Dual Core USB host task.
 
void usb_device_tasks (void)
 Dual Core USB device task.
 
void lwip_tasks (void)
 LWIP Task function.
 
void emwin_tasks (void)
 emWin dual core example task
 
void MSleep (int32_t msecs)
 Millisecond sleep.
 
int M0Image_Boot (uint32_t m0_image_addr)
 Initialize M0 and boot the core with image at m0_image_addr.
 

Detailed Description

Common code shared among dual-core examples

Build procedure: LPCOpen 18xx/43xx build instructions

Submit bug reports for LPCOpen code here.

Function Documentation

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.

Returns
None

Definition at line 232 of file example_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.

Returns
None

Definition at line 225 of file example_blinky.c.

void EMWIN_Init ( void  )

emWin dual core example initialisation function

The function initialises the LCD controller & Touch screen controller. It will register the IPC callbacks to receive graphics information from other processor core. In stand-alone configuration, it will also create the emWin Widget framewindow of the graphics application. This function is called by main() only when EXAMPLE_EMWIN is defined.

Returns
None

Definition at line 463 of file example_emWin.c.

void emwin_tasks ( void  )

emWin dual core example task

In stand-alone configuration, it will update the fields on LCD screen. In FreeRTOS/uCOS-III configurations, this will create the LCD & Touch Screen application tasks. Called by dual core main() only when EXAMPLE_EMWIN is defined.

Returns
None

Definition at line 551 of file example_emWin.c.

void IPCEX_Init ( void  )

IPC Example initialization.

This function initializes the IPC Example implementation. It calls IPC_initMsgQueue() to initialize the IPC queue of the calling core, by allocating and passing a queue array. It will be called by the main() of both core-M0 and core-M4 code for all the dual core examples.

Returns
None

Definition at line 140 of file ipc_example.c.

void ipcex_tasks ( void  )

Dual Core IPC example implementation task.

This task receives the message from the other core and will call-back the function (if registered via ipcex_register_callback()) corresponding to the received message. This function is called by main().

Returns
None

Definition at line 104 of file ipc_example.c.

void LWIP_Init ( void  )

lwIP dual core example initialisation function

This function initializes the lwIP interface (ethernet etc.). In stand-alone configuration, this function will enable the tick functionality. It will initialises the LWIP stack, initialises the network interface, initialises the DHCP & HTTPD functions. In FreeRTOS/uCOS-III configurations, it does nothing as the initialization is handed by the corresponding tasks. This function is called by main() only when EXAMPLE_LWIP is defined.

Returns
None

Definition at line 263 of file example_lwip_httpserver.c.

void lwip_tasks ( void  )

LWIP Task function.

Function that creates/performs the lwIP stack functionality. In stand-alone configuration, this function will monitor the link status and handles the packets. In FreeRTOS/uCOS-III configurations, it will create the network interface task. Called by dual core main() only when EXAMPLE_LWIP is defined.

Returns
None
None The function is called from the main task function. In stand-alone configuration, this function will monitor the link status and handles the packets. In FreeRTOS/uCOS-III configurations, it will create the network interface task

Definition at line 350 of file example_lwip_httpserver.c.

int M0Image_Boot ( uint32_t  m0_image_addr)

Initialize M0 and boot the core with image at m0_image_addr.

This function is avilable only for code that runs on M4 core, and defined in m0_ImageLoader.c

Parameters
m0_image_addr: uint32_t converted pointer to M0 image address
Returns
0 on success -1 on error
void MSleep ( int32_t  msecs)

Millisecond sleep.

Calling this function will sleep for msec number of milli seconds by a busy wait loop. This function uses the RITIMER in LPC43XX to calculate the time lapsed.

Parameters
msecs: Number of milli seconds to sleep
Returns
None

Definition at line 186 of file main.c.

void usb_device_tasks ( void  )

Dual Core USB device task.

This function creates the task that invokes the class driver task and the USB_USBTask() provided by the USB library. This function is called by main() only when EXAMPLE_USB_DEVICE is defined.

Returns
None

Definition at line 77 of file MassStorage.c.

void usb_host_tasks ( void  )

Dual Core USB host task.

This function creates the task that invokes the host tasks and the USB_USBTask() provided by the USB library. This function is called by main() only when EXAMPLE_USB_HOST is defined.

Returns
None
void USBDEV_Init ( void  )

USB Device example initialization.

Function that initializes usb device stack by calling USB_Init() and the dual core USB device example. This function is called by main() only when EXAMPLE_USB_DEVICE is defined.

Returns
None

Definition at line 71 of file MassStorage.c.

void USBHOST_Init ( void  )

USB Host example initialization.

Function that initializes usb host stack by calling USB_Init() and the dual core USB host example. This function is called by main() only when EXAMPLE_USB_HOST is defined.

Returns
None