1.1 Configuring The PRIME Stack

The PRIME Stack Configuration is centralized in the component with the same name. Depeding 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 that this parameter can only be configured when the PRIME mode is SN.

For more 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 that the PHY Layer Size and PHY Layer Address must be the same of those configured in the PLC PHY Driver.

Note that the PRIME FW Version must be the same as that configured in the PRIME Library.

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

Note that 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. “MCHP”.ASCII. Maximum 16 bytes.
PRIME_FW_MODEL

Product name, e.g. “PIC32CXXPL460”.

ASCII. Maximum 16 bytes.
PRIME_FW_VERSION

Version identifier as defined in PIB 0x0075 (PIB_MAC_APP_FW_VERSION), e.g. “HS14.01.01”.

Numerical, ASCII recommended. Maximum 16 bytes.
PRIME_PIB_VENDORVendor name as defined in PIB 0x0076 (PIB_MAC_APP_VENDOR_ID), e.g. 0x0000.Numerical, two bytes size. This value is assigned by the PRIME Alliance.
PRIME_PIB_MODEL

Product name as defined in PIB 0x0077 (PIB_MAC_APP_PRODUCT_ID), e.g. “0x3941”.

Numerical 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 Auxilary 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.