PROFINET is becoming more and more widespread in the industrial automation field. With 5.8 million devices installed by the end of 2012, PROFINET holds the top spot among Industrial Ethernet bus systems. One of the reasons for this growth is the use of PROFINET in embedded systems, which were previously integrated using proprietary bus systems or field buses.
Authors: Christian Bornschein and Bernd Westhoff, Renesas
Embedded PROFINET on a 32-bit RX Controller
With its ERTEC200/ERTEC400 and TPS-1 components, Renesas provides PROFINET implementations that are recognised as the industry standard in the highest PROFINET performance category (V.2.3 IRT, CC-C).
CC-A:
Simple device with support for Profinet-IO basic communication (alarms, diagnostics, cyclical RT communication, name resolution etc.) and simple neighbourhood detection.
CC-B:
Like CC-A, but with the addition of support for SNMP and device replacement functions.
The optional media redundancy can be implemented using an MRP client.
CC-C:
Additional support for RT_Class_3 as well as comprehensive redundancy support.
Figure 1: The PROFINET Conformance Classes.
Real-time Classes:
Profinet enables application data communication either directly via standard Ethernet frames or via UDP/IP, depending on the necessary real-time requirements. The Profibus User Organisation has defined four different real-time classes in order to categorise these requirements:
RT_Class_1:
Unsynchronised RT communication within a subnet and based on Ethernet frames. This communication type must be implemented in a device. The data are sent within a timeframe defined by the IO controller.
RT_Class_2:
Devices that support RT_Class_2 enable synchronised or unsynchronised communication via Ethernet frames. With synchronised communication, the IO controller specifies the start of the bus cycle for the IO devices. This leads to a predictable worst-case scenario for wait times in transmitting the frames from the IO device to the IO controller. The Precision Clock Transport Protocol (PTCP) synchronises the cycles.
RT_Class_3:
This class broadens synchronous data transmission in that it schedules send times for all network participants. Each network participant has a defined send time assigned to it by the IO controller. In addition, all the switches in the network ensure that the transmission paths are free at the time of the transmission. By avoiding the Ethernet CDMA procedure, there are practically no wait times for the transmission of IO data in the network. This class has special hardware requirements and cannot be handled by standard Ethernet controllers.
Figure 2: Conformance and real-time classes.
However, not all applications require this level of PROFINET performance – and an implementation on a microcontroller is very suitable for less demanding applications.
Many users and system integrators still perceive PROFINET as a resource-intensive protocol that demands powerful CPUs und and plenty of RAM. The on-chip MCU resources provided by an embedded system were barely able to cover this requirement. From a historical perspective, the users’ perception was entirely justified – after all, it was only a few years ago that a decent PROFINET integration was thought to require ERTEC and the accompanying protocol stack. Over time, the ERTEC stack was ported to other platforms, although this took some
work. Some of these ports were carried out with a view to limiting the ERTEC stack to fewer functions. As ERTEC is the standard for the fastest PROFINET – CC-C and RT-3, commonly known as PROFINET IRT – removing functionality from it always involved some deep-rooted surgery.
Following one of these surgical operations, the unwieldy IRT was slimmed down from what we could call a size XXL to a size L. But sizes M, S or even XS were still a long way off, despite engineers spending a lot of time on it. Then again, it is rather unfair to expect a reduction from size XXL to S – after all, the entire structure was designed to fulfil all conformance classes (CC) and real-time (RT) classes by default.
PROFINET on the MCU – no longer just an end in itself
Today’s microcontrollers can deliver sufficient MCU performance and RAM and still provide the user with a wide range of powerful peripherals. These systems are more than capable of achieving cycle times of 1ms. Modern MCUs, like the Renesas RX, feature a 32-bit CPU core in their common configurations and provide as much as 128kB to 256kB on-chip RAM as standard. For an intelligently written PROFINET protocol stack, that is sufficient – or even generous – if the project is limited to CC-A/B and RT-1.
The RX microcontroller’s wide range of on-chip peripherals can be used together with the extensive functionality of PROFINET – with no compromises on either side. To enable this, the MCU maker Renesas and its technology partner port GmbH offer solutions based on the 32-bit RX63N that provide PROFINET together with on-chip resources.
Unlike the flagship with CC-C und RT-3 (PROFINET IRT), the CC-A with RT-1 is positioned more at the embedded end of the PROFINET performance scale and is generally known as PROFINET I/O. An MCU-based standard device with one or two (CC-B) Ethernet port(s) can easily participate in cyclical PROFINET communication.
A complete system comprising several different 1-port CC-A and RT-1 devices can be wired cost-effectively using PnP Ethernet switches. PROFINET IRT enabled switches make it easy to integrate or mix the PROFINET I/O systems within a complex system that includes higher CCs and/or RTs (such as IRT). Providers selling this type of PROFINET device offer their customers a cost-effective device with cost-effective wiring. It just goes to show that PROFINET can be inexpensive!
“Embedded”?
What are the features that make a protocol stack capable of being embedded?
The PROFINET protocol stack developed by the embedded specialist port GmbH fulfils a range of requirements that are prerequisites for embedded applications:
• Operation with or without an OS (with and without threads)
• Interface between the protocol and the hardware
• Quick to adapt to new platforms
• Only needs timer and MAC interrupt
• Delivered in ANSI-C unconditional transparency and integration capability
• Integrated TCP/IP protocol stack
• Other TCP/IP stacks with raw socket support are available
• Little Endian / Big Endian support
• Direct Flash support
• Can be integrated in the main loop
• Static RAM allocation and zero-copy mode
• Advanced logging capability with log messages shown directly in Wireshark
• Designed for embedded PROFINET: CC-A/B, RT-1, very lean, only needs 96Kb RAM
These features optimise the protocol stack that was already designed for embedded PROFINET in any case. The solid protocol stack combines the RX microcontroller with the PROFINET SPS and assumes the actual function of the microcontroller – in other words, provision of the peripheral components.
The result is still embedded
The embedded system developed in this way is still a typical embedded system that offers:
• Low power consumption
• Adaptability to different applications
• Real-time capability
• Compatibility and certification by the PROFIBUS User Organisation
• Compatibility with Siemens
How do you get started?
The above description may sound a little complicated to novice users. However, it comprises details that may not be necessary when using the system solution. For the first few steps, it is advisable to use the RX63N Renesas Starter Kit (RSK). In combination with the PROFINET Stack from port GmbH, it forms a ready-to-use solution that produces immediate results and fast prototype development. The Renesas E1 JTAG debugger and the e2Studio development environment are also available as development tools. The e2Studio development integrates all the tools users need to develop and debug the software. The demo application is supplied with all the necessary project files, facilitating the setup and use of the starter kit.
The RSK includes the RX63N MCU with 2MB on-chip Flash and 128kB on-chip RAM memory. This product group achieves high computing performance with 165 DMIPS at 100 MHz CPU and Flash operation. It is also very scalable and can be used in a wide variety of products with different requirement profiles. RX63N variants are also available with integrated Flash memory from 768kB to 2MB and RAM of 128kB to 256kB. The choice of packages includes LQFP, LGA and BGA.
These RX products include the Ethernet MAC IEEE 802.3 compatible interface with the Media Independent Interface (MII) and Reduced Media Independent Interface (RMII) to facilitate PHY connections.
They also provide Controller Area Network (CAN) 2.0B compliant interfaces with up to three channels (a CANopen solution for this is also available from port GmbH) and two Universal Serial Bus (USB) full-speed hosts, USB OTG and device functions.
The RX products are designed to provide integration density and an attractive cost structure in combination with extremely fast embedded Flash technology. That makes them the right choice for any application that needs to run large communication stacks, as for PROFINET, in a single-chip solution that does not use external memory. Detailed documentation about them is available on the internet and is naturally also included in the starter kit.
A great pairing
The combination of Renesas’ RX63N 32-bit MCU and port’s PROFINET protocol stack offers users an attractive way to start working on PROFINET applications within Renesas’ RXMAX programme. The Renesas RX63N MCUs can be used with port’s PROFINET with no constraints, enabling users to develop powerful yet cost-effective PROFINET I/O (CC-A, RT-1) devices. The cost advantage goes even further with the simplified network structure that extends to the system integrator and its customers. In principle, solutions like CANopen, EtherNet/IP, POWERLINK and EtherCAT can also be provided on the same platform. n
Free Demo, Documentation and Quick Start Guide could be downloaded at:
www.port.de/en/products/driver/driver-for-renesas-rx-series.html#tab4
About the authors:
Christian Bornschein, who heads up Marketing and Sales at the Renesas Gold Alliance Partner port GmbH, also promotes the company’s protocol stacks and development services. He has many years of experience with Industrial Ethernet, having worked as a hardware developer and subsequently as a product manager. As a result, he has good knowledge of the needs and requirements in the automation field.
Bernd Westhoff manages RX600 Product Marketing within the Industrial & Communication Business Group at Renesas Electronics Europe.
www.renesas.com