1.1 Configuring the PRIME Stack

The PRIME Stack configuration is centralized in the component with the same name. Depending on the type of PRIME node, the configuration options differ. The default configuration is for a Service Node application.

Figure 1-8. PRIME Stack Default Configuration Options

PRIME Mode

Figure 1-9. PRIME Mode

PRIME nodes can be configured to be Base Node (BN) or Service Node (SN) in the network, according to the PRIME specification. Further configuration options depend on the selected PRIME mode.

Type of PRIME Project for Separated Applications

Figure 1-10. Type of PRIME Project

The Service Node has been implemented in separated software modules to allow an easy handling of the firmware upgrade. Therefore, two types of applications are required:

  • application project: This application contains a PRIME Stack with only the PAL module and communicates with the PRIME library through the PRIME API. It also includes all necessary H3 services, drivers and hardware peripherals, whose interfaces are mapped to the HAL API required by the PRIME Library. This would be the user application.
  • bin project: This application contains the PRIME Library, with the PRIME API stored at an specific location (prime_api pointer).

It is also possible to select a monolithic project, that is, one non-separated project which contains the whole PRIME Stack together with the user application in only one binary. However, a firmware upgrade of this kind of architecture is not supported. The main purpose of this action would be to debug. Currently, Microchip only provides support for separated applications.

Note: This parameter can only be configured when the PRIME mode is SN.

For additional information about the applications, refer to the smartenergy_prime_apps repository.

PRIME Firmware Upgrade Configuration

Figure 1-11. PRIME FU Configuration
This set of parameters define:
  • the sizes and addresses of the software modules that can be upgraded
  • the identifiers of the software modules that can be upgraded, with a maximum metadata size
Note: The PHY Layer Size and PHY Layer Address must be the same of those configured in the PLC PHY Driver.
Note: The PRIME FW Version must be the same as that configured in the PRIME Library.

For additional information about the handling of the firmware upgrade, refer to the File Transfer Service for Firmware Upgrade in the Service Node.

Note: These parameters can only be configured when the PRIME mode is SN in a separated application, except the PRIME FW Version, which can also be configured when the PRIME mode is SN and type of project is bin project, or when the PRIME mode is BN.

PRIME Version

Figure 1-12. PRIME version

The current version of the PRIME specification is 1.4, but Microchip also supports version 1.3.6. This parameter allows to select the version to run.

PRIME FW Version Information

Figure 1-13. PRIME FW Version Information

In the PRIME Library, the first 20 bytes contain the Vendor, Model and Version information corresponding to this library. These metadata are useful to identify and control which PRIME library is being used.

The modifiable options are the following:
Table 1-1. PRIME FW Information Attributes
AttributeDefinitionFormat
PRIME_FW_VENDORVendor name, e.g., MCHPASCII. Maximum 16 bytes.
PRIME_FW_MODELProduct name, e.g., PIC32CXXPL460ASCII. Maximum 16 bytes.
PRIME_FW_VERSIONVersion identifier as defined in PIB 0x0075 (PIB_MAC_APP_FW_VERSION), e.g., HS14.01.01Numerical, ASCII recommended. Maximum 16 bytes.
PRIME_PIB_VENDORVendor name as defined in PIB 0x0076 (PIB_MAC_APP_VENDOR_ID), e.g., 0x0000Numerical, two bytes size. This value is assigned by the PRIME Alliance.
PRIME_PIB_MODELProduct name as defined in PIB 0x0077 (PIB_MAC_APP_PRODUCT_ID), e.g., 0x3941Numerical or ASCII, two bytes size.

Enable BN Slave

Figure 1-14. Enable BN Slave

In PRIME v1.3.6, apart from Base Node and Service Node, an Auxiliary Node or Base Slave Node is defined to be used in multi-transformer substations. The Base Slave Node is a monolithic Service Node where the communication with the Base Node takes place using the Serial PHY layer.

Note that this parameter can only be configured when the PRIME mode is BN and the PRIME version is 1.3.6.

RTOS Settings

Figure 1-15. RTOS Settings

The Base Node can be managed with an operating system when the corresponding Harmony module has been added into the application.

For additional information about the applications, refer to the smartenergy_prime_apps repository.

The RTOS parameters define:
  • the task priority for PRIME
  • the task delay in milliseconds