AM64x MCU+ SDK  08.02.00
PRP Demo

Introduction

The example is an PRP (Parallel Redundancy Protocol) Dual Attached Node demo application using LwIP stack. PRP is zero downtime industrial redundancy protocol that operate at Layer 2 and use commercial off-the-shelf Ethernet communication chips and physical media. PRP has trailer attached to standard ethernet frames and can be supported using traditional switches. PRP is mainly used in the substation automation market and the target applications use IEC 61850 protocols. This application does not provide any IEC 61850 integrated examples but it’s easy to integrate one given the transparent nature of PRP implementation.

Supported Combinations

Parameter Value
CPU + OS r5fss0-0_freertos
ICSSG ICSSG1
Toolchain ti-arm-clang
Board am64x-evm
Example folder examples/industrial_comms/hsr_prp_demo

Steps to Run the Example

Build the example

  • When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
  • When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)

HW Setup

Note
Make sure you have setup the EVM with cable connections as shown here, EVM Setup. In addition do below steps.

AM64X-EVM

  • Connect a ethernet cable to the EVM from host PC as shown below

Ethernet cable for ICSS based ethernet

Run the example

Attention
If you need to reload and run again, a CPU power-cycle is MUST
  • Launch a CCS debug session and run the example executable, see CCS Launch, Load and Run
  • You will see logs in the UART terminal as shown in the next section.
  • Note the IP address seen in the log, this is what we will use to communicate with the EVM.
Note
PRP RGMII example is partially tested.

UART Menu

  • The application has a built in UART console menu. It allows the user to perform the following tasks :
    • View PRP statistics - Allows user to see number of packets forwarded to host, number of duplicates, number of packets transmitted by the host to the LRE (Link Redundancy Entity).
    • View PRP LRE statistics - Allows user to see the stats reported by LRE (Link Redundancy Entity).
    • View PRP Configuration - Allows user to see the configuration
    • View PRP Node Table - User can see the node table contents which keeps a track of all devices on the network which send PRP Supervision frames. Device MAC ID, table entry index can be viewed.
    • Configure Multicast filter - User can configure the multicast filtering support using a UART driven submenu.
    • Configure VLAN filter - User can configure the VLAN filtering support using a UART driven submenu.
    • Assign an IP address - The IP address is stored at a fixed location in SPI flash at the offset defined by SPI_EEPROM_DEVICEIP_OFFSET. This IP address is taken at startup and user can also change the IP address
    • Print CPU Load - Prints CPU load on the UART console
    • Configure storm prevention - User can configure(enable/disable) the storm prevention and set the credits indivdually for UC, BC and MC traffic.

Sample Output

Mode: MII
Starting lwIP, local interface IP is 192.168.1.10
[LWIPIF_LWIP] Interface layer handle is Initialised
[LWIPIF_LWIP] NETIF INIT SUCCESS
status_callback==UP, local interface IP is 192.168.1.10
PRP Sample application running
Assigned IP : 192.168.1.10
Mac Id : 70:ff:76:1e:30:5c
PRP Application Menu Options. Press key (Upper/Lower)
*******************************************
S : Show Statistics
L : Show LRE Statistics
C : Show PRP Configuration
N : Show Ring members/Node Table
M : Multicast filter handling
V : VLAN filter handling
E : Print CPU Load
I : Assign IP address
X : To perform DUT side settings
H : Help menu. Shows details on all the options
********************************************
link_callback==UP

IP Configuration

  • The example starts off with stack being initialised with a  static IP stored in EEPROM or from default IP in application code. The PRP UART menu gives user ability to change IP Address via terminal using steps mentioned below.
PRP Application Menu Options. Press key (Upper/Lower)
*******************************************
S : Show Statistics
L : Show LRE Statistics
C : Show PRP Configuration
N : Show Ring members/Node Table
M : Multicast filter handling
V : VLAN filter handling
E : Print CPU Load
I : Assign IP address
X : To perform DUT side settings
H : Help menu. Shows details on all the options
********************************************
i
Type IP Address and hit Enter: 192.168.1.11
Successfully assigned new IP address
Assign IP address...completed
IP Address : 192.168.1.11
Device config : PRP

Communicate with the EVM using ethernet

  • Firstly you can try to reach the EVM using ping as shown below, using a command shell on the host PC
      > ping 192.168.1.10
    

Troubleshooting issues

  • If you see a valid MAC address and address and link_callback==DOWN is seen then
    • check the ethernet cable if it is properly connected

See Also

PRP(Parallel Redundancy Protocol) FWHAL