UM3175 STEVAL FSM01M1 evaluation board User Manual

June 12, 2024
ST

UM3175 STEVAL FSM01M1 evaluation board

Product Information

  • Product Name: STSW-FSM01 software expansion package for STEVAL-FSM01M1 evaluation board
  • Model Number: UM3176
  • Revision: Rev 1 – June 2023
  • Manufacturer: STMicroelectronics
  • Website: www.st.com

Architecture

The software is based on the STM32CubeHAL (hardware abstraction layer) for STM32 microcontrollers. The STSW-FSM01 package extends the STM32Cube framework by providing the board support package (BSP) for the STEVAL-FSM01M1 expansion board.

Folder Structure

The software package includes the following folders:

  • Binaries: Contains compiled binary files ready for upload and execution on an STM32 Nucleo board.
  • Documentation: Contains a comprehensive help file with key information about the code function.
  • Drivers: Contains hardware abstraction layer code for the STM32 MCUs. This folder comes unchanged from the STM32Cube framework.
  • Project folders (STM32CubeIDE, EWARM, and MDK-ARM): Contains project files and file system structures for the supported development toolchains.
  • STM32CubeMX files (STSW-FSM01.ioc, .Mxproject): Used for CubeMX project configuration.
  • Inc folder: Contains STM32Cube generated header files.
  • Src folder: Contains STM32Cube generated source files as well as modified main file.
  • Libc folder: Contains implementations of C library functions for better cross-toolchain compatibility.

System Setup Guide

Hardware Components

The following hardware components are required:

  1. STM32 Nucleo board NUCLEO-F401RE (in default configuration)
  2. USB cable (type A to Mini-B USB) to connect the STM32 Nucleo and PC
  3. +24VDC power supply and the associated wires to supply the STEVAL-FSM01M1 expansion board
  4. Windows PC

Refer to STEVAL-FSM01M1 User manual UM3175 for all information about the hardware components and its connection.

Software Components

The STSW-FSM01 firmware package includes native UART communication protocol allowing access to the STEVALFSM01M1 board from PC through UART (USB running as a virtual COM port). It can also be connected by STLINK and programmed using one of the supported STM32 IDEs.
In order to communicate with STM32 Nucleo onboard ST-LINK in-circuit debugger, it is mandatory to install the ST-LINK USB driver for Windows (available at www.st.com).
In order to access the board through UART, a serial communication terminal application has to be installed on the PC. The PuTTY console is described in this document, but any other application with configurable serial communication can be used. The following software components are required to set up the suitable development and testing environment for STM32 Nucleo and STEVAL-FSM01M1 industrial digital I/O expansion board:

  1. STEVAL-FSM01M1 firmware BSP package (STSW-FSM01)
  2. One of the following supported toolchains can be used:

Introduction

STSW-FSM01 is the software package enabling communication, control, and programming of the dual-channel digital I/O board STEVAL-FSM01M1. It is compatible with a STM32 Nucleo board NUCLEO-F401RE.
This package provides a complete set of program routines to control all onboard functions and to monitor system conditions during runtime. The existing code can be easily extended by a user-specific application programs thanks to a simple and clearly defined API.
Additionally, the firmware has its native UART communication protocol implemented. Therefore it is also easy to control the board from PC even without any programming.

Architecture

The software is based on the STM32CubeHAL (hardware abstraction layer) for STM32 microcontrollers. The STSW-FSM01 package extends the STM32Cube framework by providing the board support package (BSP) for the STEVAL-FSM01M1 expansion board.

Folder structure

The following folders are included in the software package:

  • Binaries contain compiled binary files ready for upload and execution on an STM32 Nucleo board.
  • The documentation contains a comprehensive help file with key information about the code function.
  • Drivers contain:
    • STM32Cube HAL is located in its subfolder STM32F4xx_HAL_Driver. These files are not specific to the STEVAL-FSM01M1 software but come directly from the STM32Cube framework and represent the hardware abstraction layer code for the STM32 MCUs.
    • CMSIS folder that contains the Cortex® microcontroller software interface standard files from Arm. These files are vendor-independent hardware abstraction layer for the Cortex-M processor series. This folder comes also unchanged from the STM32Cube framework.
    • BSP folder with the support package required for STEVAL-FSM01M1 configuration, control, and monitoring.
  • Project folders (STM32CubeIDE, EWARM, and MDK-ARM) contain project files and file system structures for the supported development toolchains.
  • STM32CubeMX files (STSW-FSM01.ioc, .Mxproject) are used for CubeMX project configuration
  • Inc folder contains STM32Cube generated header files.
  • Src folder contains STM32Cube-generated source files as well as modified main file.
  • Libc folder contains implementations of C library functions for better cross toolchain compatibility.

System setup guide

Hardware components

The following hardware components are required:

  1. STM32 Nucleo board NUCLEO-F401RE (in default configuration)
  2. USB cable (type A to Mini-B USB) to connect the STM32 Nucleo and PC
  3. +24VDC power supply and the associated wires to supply the STEVAL-FSM01M1 expansion board
  4. Windows PC

Refer to STEVAL-FSM01M1 User manual UM3175 for all information about the hardware components and its connection.

Software components

STSW-FSM01 firmware package includes native UART communication protocol allowing to access the STEVAL-FSM01M1 board from PC through UART (USB running as a virtual COM port). It can be also connected by ST-LINK and programmed using one of the supported STM32 IDEs (listed below).
In order to communicate with STM32 Nucleo onboard ST-LINK in-circuit debugger, it is mandatory to install the following driver (available at www.st.com):

  • STSW-LINK009 ST-LINK USB driver for Windows

UART control access

In order to access board through UART a serial communication terminal application has to be installed on the PC. In this document we describe the connection procedure using the PuTTY console but the process is similar also with any other application with configurable serial communication.
Programming access using IDE for STM32
The following software components are required to set up the suitable development and testing environment for STM32 Nucleo and STEVAL-FSM01M1 industrial digital I/O expansion board:

  1. STEVAL-FSM01M1 firmware BSP package (STSW-FSM01)
  2. One of the following supported toolchains can be used:
  3. STM32CubeIDE
  4. IAR Embedded Workbench for ARM® (EWARM)
  5. RealView microcontroller development kit (MDK-ARM-STR) toolchain

UART control access

PuTTY console setup guide

This section will explain in steps how to correctly configure PuTTY console for communication with board over ST-LINK. You can follow an analogous configuration steps also with any other console application. It is advised to use your console application in fullscreen mode on a larger display for better output formatting.

  • Step 1. Download and install PuTTY and STSW-LINK009 (use administrative privileges when necessary).

  • Step 2. Connect the Nucleo board by a USB cable and open Windows Device Manager to inspect Ports (COM & LPT) section as shown in Figure 3. Look for the port designated as STMicroelectronics STLink Virtual COM Port. Take a note of its identifier (COMx). In our case (see Figure 3)UM3175-STEVAL-FSM01M1-evaluation-board-FIG- \(3\) it is COM5.
    Figure 3. Inspection of virtual COM ports using Device Manager

  • Step 3. Open PuTTY and check options on the Terminal page as highlighted in Figure 4.UM3175-STEVAL-FSM01M1-evaluation-board-FIG- \(4\)

  • Step 4. Check options on the Serial page according to Section 4.1.UM3175-STEVAL-FSM01M1-evaluation-board-FIG- \(5\)

  • Step 5. Check options on the Session page highlited in Section 4.1.

    • Step 5a. Check Serial option
    • Step 5b. Enter port identifier in the Serial line field
    • Step 5c. Enter 115,200Bd in the Speed field
    • Step 5d. Choose name of the configuration in Saved Sessions field Step 5e. Click Save and Open
    • Step 5f. To configure another serial port repeat steps 3 to 5UM3175-STEVAL-FSM01M1-evaluation-board-FIG- \(6\)

Commands for interactive board control

When the serial connection is set up according to previous steps and opened you will be presented by terminal interface. This package provides console application for executing commands. It is advised to reset MCU board when serial connection is already opened, however it is not mandatory.
The board is operated by transmitting text based commands through UART. In general, every command starts with specification of a function keyword followed by a parameter keyword specifying what action should be applied upon that function.

Table 1. Description and usage of commands

Action Description Usage
on Turns function on function on

off

| Turns function off (when functions are not specified, turns off all

functions )

| function off

off

state| Returns state of function in logical format (on/off)| function state
level| Returns state of function in number format| function level
states| Returns state of all functions in logical format (on/off)| states
levels| Returns state of all functions in number format| levels
help| Displays help with information about all commands and their usage| help
clear| Clears text from terminal window| clear

Table 2. Description of functions

Function Description
vcc VCC voltage
vcc1 VCC1 voltage
vcc1_dsc VCC1 discharge switch
vcc2 VCC2 voltage
vcc2_dsc VCC2 discharge switch
out1 OUT1 voltage
out1_dsc OUT1 discharge switch
out2 OUT2 voltage
out2_dsc OUT2 discharge switch
in1 IN1 detection
in2 IN2 detection
coff1 Cut-off feature switch (output channel 1)
coff2 Cut-off feature switch (ouput channel 2)
tp1 Test Pulse feature switch (input channel 1)
tp2 Test Pulse feature switch (input channel 2)

An example of using commands on a serial console is shown in Figure 7.UM3175
-STEVAL-FSM01M1-evaluation-board-FIG- \(7\)

Figure 7. Control command usage examples

Programming access using IDE for STM32

Board setup

  • Step 1. Plug the STM32-F401RE board on top of the STEVAL-FSM01M1 expansion board using the ST Morpho connector pin headers CN7 and CN10.
  • Step 2. Power on the STM32 Nucleo development board by connecting a USB cable between the Nucleo board CN1 connector and a PC USB port.
  • Step 3. Power on the STEVAL-FSM01M1 expansion board by properly connecting CN1 connector pin 5 (VCC) and 6 or 7 (GND) to the DC power supply (24V). Refer to STEVAL-FSM01M1 User manual UM3175 for any details.
  • Step 4. Open your preferred toolchain (STM32CubeIDE, EWARM from IAR, or MDK-ARM from Keil).
  • Step 5. Open project in STSW-FSM01 folder from its dedicated subfolder.
  • Step 6. Build the project and load its image into target STM32 memory.
  • Step 7. Run the program from inside your toolchain.

User application programming

This firmware package provides users with a programmable interface (API) allowing arbitrary program code modifications or even development of additional application layers using all existing functionality. Functions are structured in standard source (.c) and header (.h) files with key code features annotated. Excerpt examples of the API implementation are shown in Figure 8 and Figure 9. For a comprehensive overview of how the source code is structured please refer to the compiled help file inside the Documentation folder.UM3175-STEVAL-FSM01M1-evaluation-board-FIG-
\(8\)

Revision history

Date Revision Changes
16-Jun-2023 1 Initial release.

IMPORTANT NOTICE – READ CAREFULLY

  • STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.
  • Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products.
  • No license, express or implied, to any intellectual property right is granted by ST herein.
  • Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product. ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.
  • Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
  • © 2023 STMicroelectronics – All rights reserved

UM3176 – Rev 1 – June 2023
For further information contact your local STMicroelectronics sales office.
www.st.com

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals