2.1 PRIME Base Node Modem Embedded Project
The PL360G55CF-EK is flashed with the example project base_node_modem from the last PRIME 1.4 Firmware package release. The original project is located on the following path of the PRIME Base 1.4 package: thirdparty\prime_ng\apps_1_4\prime_base_modem.
Microchip provides a library that contains the MAC layer, the Convergence Layer and the Management Plane, as described in the PRIME specification. It also includes a proprietary Base Management module to handle the interface between the Base Node and the main DCU user application and enhances it with additional functionalities.
It is important to note that the only entry point to the PRIME FW stack from the user application is through the PRIME API, which contains the interfaces defined in the PRIME specification as well as stack control functions.
The Management Plane enables a local or remote control entity to perform actions on a node. These actions include providing access to internal parameters defined by PIB attributes as well as managing the firmware upgrade inside the stack.
The Base Management module is a Microchip proprietary extension over the PRIME specification to increase the functionalities of a Base Node. The PRIME specification does not always define the interfaces between the Base Node and the DCU user application, so new interfaces must be implemented as required.
The Base Management handles the Firmware Upgrade Protocol interface and access to the PRIME Profile. It also notifies about network events, such as node registrations and unregistrations, and manages the whitelist.
In the base_node_modem by default, the USI port is the USB interface of the PL360G55CF board. In this case, the mikroBUS UART (USART4) is used, which requires some modifications in two header files.
If working with a Linux or Windows Host connected directly to the PL360G55 board, the project MUST NOT be modified because, by default, the USI Port goes through the USB Port.
#ifndef CONF_USI_H_INCLUDED
#define CONF_USI_H_INCLUDED
/* Port Communications configuration */
#define NUM_PORTS 1
/* In case of using USB_TYPE, refer to conf_usb.h in order to set baudrate by default */
/* #define PORT_0 CONF_PORT(USB_TYPE, 0, 115200, 1024, 1024) */
/* In case of using UART/USART TYPE */
#define PORT_0 CONF_PORT(USART_TYPE, 4, 115200, 1024, 1024)
#endif /* CONF_USI_H_INCLUDED */
#ifndef CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
/* Enable Watchdog */
#define CONF_BOARD_KEEP_WATCHDOG_AT_INIT
/* Configuration for USI Port on MikroBUS */
#define CONF_BOARD_UART_MIKROBUS
#define CONF_BOARD_USART4
/* #define CONF_BOARD_UART_CONSOLE */
#define CONSOLE_UART USART0
#define CONSOLE_UART_ID ID_FLEXCOM0
/* Configure MIKROBUS_SPI */
/* #define CONF_BOARD_SPI_MIKROBUS */
/* Configure MIKROBUS_TWI */
/* #define CONF_BOARD_TWI1_MIKROBUS */
/* Configure USB */
#define CONF_BOARD_USB_PORT
#endif /* CONF_BOARD_H_INCLUDED */
Compile the project and program the board to be used as the PRIME Base Node modem.