/
Quick start guide to integrating Hilscher NSHIELD 90-RE into STM32 ecosystem

Quick start guide to integrating Hilscher NSHIELD 90-RE into STM32 ecosystem

This article will guide you through setting up and using the Hilscher NSHIELD 90-RE with an STM32 Nucleo development board (NUCLEO-H563ZI). It will help you understand how to successfully set up and operate the NSHIELD90-RE with the STM32 ecosystem so that the NSHIELD 90-RE communicates with a PLC.

Introduction

The NSHIELD 90-RE can be used directly as an STM32 Nucleo expansion board and is designed for 3.3V-based hardware designs such as the STM32 Nucleo-64 and Nucleo-144 development boards. The NSHIELD 90-RE comes with a pre-installed evaluation firmware(PROFINET). If you want to use other protocols, please refer toHow to use PC utility to update firmware for NSHIELD 90-RE.

This guide focuses on connecting the NSHIELD 90-RE to STM32 Nucleo-H563ZI board and using it to exchange data with a PLC over PROFINET. We will program the STM32 host controller using STM32CubeIDE.

In the communication system, the NSHIELD 90-RE works as a ready-to-use PROFINET device and is configured by the STM32 host device through the SPM (Serial dual-Port Memory) interface. The demo application allows exchanging 10 Bytes Input (from the Master's perspective) and 6 Bytes Output.

Download and installation

Visit the STMicroelectronics website STM32CubeIDE - STMicroelectronics to download the latest version of STM32CubeIDE. Follow the installation instructions provided on the website.

You can download the PROFINET application example project from the provided link: STM32CubeExpansion_netX_H5_PNSV5_V3.0.0.0.zip

The application example provided is prepared for a Nucleo-H563ZI board. If you use another STM32 Nucleo development board, the driver and the device configuration for the STM32 Nucleo board should be adjusted accordingly.

Run and debug

  1. Launch the STM32CubeIDE software

  2. Open the STM32CubeIDE

    • Click on File Import

    • In the import dialog, select Existing Projects into Workspace and click Next.

    image-20240822-095058.png

     

    • Navigate to your downloaded project folder, select the project and click Finished. You can optional copy the project into your workspace.

    image-20240822-100232.png

     

    • Click Yes To All to override the .setting

  1. Build the Project
    Select the project in the Project Explorer and click Build.

  1. Connect your STM32 Nucleo development board

    • Plug the NSHIELD 90-RE board via its Arduino pin headers to the Nucleo host board correctly, and make sure that the jumper of X2 is set to EXT.

    • Use a USB cable to connect the Nucleo board to your PC. The USB STLINK connector is used.

  2. Configure Debugging

    • Go to Debug → Debug Configurations...

     

    • Right click on STM32 C/C++ Application and create a New Configuration

    • Go to the Debugger tab and select your debug probe. If you are using the onboard USB ST-Link, choose either ST-LINK (ST-LINK GDB server) or ST-LINK (OpenOCD).

     

    • In our case, ST-LINK GDB server is the choice.

    • Click Scan to check if the board is detected by the IDE. If successful, an ID will appear in the interface (see the picture above).

    • Then click Apply and Debug. The software is then loaded onto the STM32.

  3. Monitor the Output
    The application example uses UART via the USB interface to print out information.
    You can use software like Download PuTTY - a free SSH and telnet client for Windows or HTerm to display this output.
    Check in the device manager which COM port of the STM32 is displayed. The following port configuration is required.

    Baud rate: 115200
    Data: 8 bit
    Stop: 1 bit
    Parity: None
    Flow Control: None
    Newline at: LF

    The output looks like the screenshot below.

This picture does not show the complete UART output.

Connect to a PLC

We use a Siemens PLC to test the communication.

  1. Use Hilscher https://hilscher.atlassian.net/wiki/x/BgBWBw tool to set the device name
    Use an Ethernet cable to connect the NSHIELD 90-RE to your PC first and set the correct device name so that later the PLC can find the device.

    • Open the tool, and search the devices

    • The device NETX V5 RE/PNS was found and the host application example hasn’t set the device name

    • Right click on the device line and set the device name to “netxv5repns

    • The name was set and showed in the tool

       

  2. Connect to a Siemens PLC
    Disconnect the Ethernet cable from your PC and connect the NSHIELD 90-RE to the PLC.

  3. Load the Device Description in TIA Portal

    • Import the device description file (GSDML) into TIA Portal.

    • Load the hardware configuration into the PLC.

    • after loading the hardware configuration into the PLC, these two devices go into communication.

For the simple demo, the GSDML file is located at <your stm32 demo path>/cifXApplicationDemoPNS_Simple/DeviceDescription

For the extended demo, the GSDML file is located at<your stm32 demo path>/cifXApplicationDemoPNS_Extended/DeviceDescription

For this guide, the GSDML-V2.43-HILSCHER-NSHIELD 90-RE PNS-20250205.xml under ./cifXApplicationDemoPNS_Simple/DeviceDescription was used.

Other PROFINET masters, e.g. CIFX 50E-RE or NHST-T100-EN/PNM can be used similarly.

Related content

Downloads NSHIELD 90-RE
Downloads NSHIELD 90-RE
Read with this
netSHIELD "NSHIELD 90-RE"
netSHIELD "NSHIELD 90-RE"
Read with this
Support of Secure Boot with netX90
Support of Secure Boot with netX90
Read with this
netX 90 - PROFINET IO Device - Examples
netX 90 - PROFINET IO Device - Examples
Read with this
STM32 - PROFINET IO Device - Examples
STM32 - PROFINET IO Device - Examples
Read with this
Software
Read with this