Skip to content

Sienda TSN Stack ARM M4 Reference Project - Getting Started

Introduction

This project is an example reference design that integrates the Sienda TSN Stack into an STM32F429 application. The project runs on an STM32 Nucleo-144.

The Sienda Time Sensitive Network Stack is a software library written in C++ that provides full protocol support for the IEEE Time Sensitive Networking (TSN) standards defined in IEEE 802.1BA.

The purpose of this design is to provide an example endpoint that runs on a cheap and widely available development platform with as few modifications to the board as possible. This reference can be used as a basis for developing a Milan™ compatible endpoint. The example will enumerate in a Milan compatible controller and allow talker and listener audio stream connections.

Getting started

Here's how to run the example, using the compiled binary.

Wire it up

  • Ensure the various jumpers and solder bridges are connected as default on a new STM Nucleo-144.
  • Connect a jumper wire between pin PE4 and PE7, as shown below (This is explained in the technical guide).
  • Connect the PC to the USB port highlighted in the picture below.

Run the pre-compiled binary

  • Download and install ST-Link utility.
  • Open ST-Link Utility and select Target > Connect.
  • Once connected, select Target > Program.
  • Select ___.bin file and upload to flash address 0x08000000.
  • Close ST-Link utility.

Info

The Nucleo boards contain an MBED interface which will appear on a windows PC as a USB drive. This can cause unexpected reboots of the Nucleo every ten minutes or so, when the windows PC accesses the MBED drive, so for extended evaluation and testing it is recommended that the Nucleo be powered from a USB power supply once the firmware has been uploaded.

Test it

  • Check the green heartbeat LED (Nucleo LD1) is toggling every second.
  • Connect the ethernet port to your PC, or an AVB switch.
  • Open a Milan compatible AVB controller (Such as Hive)
  • The Nucleo endpoint should enumerate and show in Hive as below:
  • Right-click on the entity and select 'Identify Device'. The blue LED (LD2) should light on the Nucleo.

You should now be able to connect talker and listener streams to other devices, including another Nucleo running the same code.

!!!info The Nucleo boards sometimes fail to establish a link on the ethernet port. This is not particular to the Sienda firmware but happens on new or newly erased boards too. On affected boards you may find that after resetting the board, in around 1/10 - 1/3 resets no link is established on the ethernet port. If you have an affected board then please simply reset the board (RESET button) until a link can be established.

Multiple Nucleos

You can have up to 4 Nucleos running this reference firmware on a single Milan network, but each board must have a unique MAC address. There are two bootstrap GPIO pins which can be used to set the lowest 2 bits of the MAC address. The default MAC address is 0x70B3D5A8102C, where the two lowest bits are unset. Simply bridge pins PD2 and/or PG2 to GND to set bits 0 and 1, respectively. You will see the change reflected in the the number appended to the endpoint entity name.

The picture below shows both pins bridged to GND, with PD2 in green and PG2 in orange.

Audio

The endpoint supports the following streams:

  • 1 x 48kHz 2-channel audio listener stream
  • 1 x 48kHz 2-channel audio talker stream
  • 1 x CRF clock stream input
  • 1 x CRF clock stream output

The talker stream transmits a sine wave on both channels, for ease of testing.

Channels 1 & 2 of the listener stream are transmitted via standard Philips format I2S, 32-bit @ 48kHz on the following pins:

SAI Function Pin
FS Clk PE4
Bit Clk PE5
Audio Data Out PE6

An inexpensive codec breakout board that does not require MCLK, such as one based on the TI PCM5102A, can be used to output the audio.

Learn more

A technical guide to the project architecture and stack integration can be found here.