画像
Manuel Kunstein
Manuel Kunstein
Staff Application Engineer
掲載: 2023年7月4日

Introduction

Today the variety of Industrial Ethernet protocols typically requires production and delivery of the same hardware with different software flavors, since a monolithic approach with one single application is difficult to handle.
This article presents an easy boot loader solution for RZ/N2L and RZ/T2M that allows the detection of the used Industrial Ethernet protocol and loads the appropriate application during run-time from flash to RAM. The different requirements of RAM consumption and execution speed are supported by flexible usage of internal SystemRAM, external SDRAM or external HyperRAM. The existing Ethernet protocol applications just require minor changes to startup code and linker scripts.

Loading of Protocol Application by Boot Loader

The startup code in ROM copies the boot loader application from the flash to the internal RAM according to the loader parameters also stored in the flash. The boot loader is started. The Industrial Ethernet protocol detection is performed as described below in detail. Depending on the result the boot loader copies the corresponding code and data from the flash to the RAM and finally starts the application from that location.

画像

The user must define the type of RAM and specify the locations for each protocol application. A table in the boot loader application holds the flash source address, the RAM destination address, and the size of the applications. The needed values are automatically filled in during the linker process, based on the linker scripts of the applications. In the case of RZ/T2M a second binary can be copied accordingly to support dual-core applications.

Ethernet Protocol Auto-Detection

After the low-level startup, the boot loader initializes the hardware to bring up the Ethernet interface. The software evaluates the EtherType field of incoming Ethernet packets to detect the used protocol in the network. If a certain number of frames of a protocol were received the boot loader copies the corresponding application from the flash to the RAM and starts the execution. Previous hardware initializations are reverted before.

画像

Conclusion

This solution presents an easy example based on Renesas RSK and FSP to demonstrate how to detect widely used Industrial Ethernet protocols in a network and select the right protocol application for that. To adopt this solution, only minor changes are required to the existing stand-alone applications.
Demo code for RZ/N2L and RZ/T2M for e2studio is already available.

この記事をシェアする