STM32F411x connected with a Trinamic TM8462
Introduction
This document describes the integration of the delivered EtherCAT example projects for ST STM32F411x target with the development environment STM32CubeIDE.
Target System
The port EtherCAT stack is implemented and tested on a ST STM32F411RE-Nucleo board connected to a Trinamic TM8462 EtherCAT® slave controller via SPI. The ESC evaluation board is called “TMC8462-EVAL v3.1”. The connection to the EtherCAT board is implemented via simple connector cables.
Toolchain:
Compiler/IDE: GNU ARM Embedded v10.3 used in STM32CubeIDE Version: 1.8.0
Flash tool/Debugger: Onboard ST-Link
General information
Port’s EtherCAT Stack runs on the Cortex-M4 core of the STM32F411x.
Required connections on the ST Nucleo board (SPI1 used by default):
PA5 → SPI1_SCK
PA6 → SPI1_MISO
PA7 → SPI1_MOSI
PA4 → SPI1_ChipSelect
Optional connections for interrupt driven PDI access:
PA0 → PDI-IRQ
PA1 → SYNC0 (required for DC feature)
Additionally, the power supply of the TMC8462-EVAL board is provided by the Nucleo board (5V, GND) as shown in the picture above. While this solution works, it is recommended to supply the TMC8462-EVAL board with an external power source. In any case, the GND signals of both boards must be connected to establish a common ground.
For further driver information, please read ../drivers/st_stm32f411x/README.txt
You can find port’s EtherCAT example projects in the folder of the delivery package:
../examples/st_stm32f411x/
Besides the EtherCAT Driver and the example applications you also need the
HAL-layer STM32Cube_FW_F4 provided by STMicroelectronics.
For further informations please read ../examples/st_stm32f411x/README.txt
Import projects
Import existing projects via STM32CubeIDE:
Use the Windows Explorer to insert the "Drivers" folder from the HAL layer STM32Cube_FW_F4 into the project structure shown:
Then you can build and run the example projects.
ICC tool project
The sample projects are designed with port’s ICC tool. The HW configuration uses the generic STM32 entry with SPI slave ESC interface. Shown here for example s1:
Please use this setting also for your own customer projects.
Available sample applications
s1_stm32f411x:
SDO read and write
2 RX-PDOs and 2 TX-PDOs
object dictionary containing objects of various data types
s3_stm32f411x:
SDO read and write
SDO Info service
SDO Info object names
2 RX-PDOs and 2 TX-PDOs
Split SDO-Access
Split NMT-Control
object dictionary containing objects of various data types
s4_stm32f411x:
SDO read and write
SDO Info service
SDO Info object names
2 RX-PDOs and 2 TX-PDOs
Split SDO-Access
Split NMT-Control
object dictionary containing objects of various data types
EoE service with rudimentary ARP and IGMP support (ping)
FoE service
s5_stm32f411x:
SDO read and write
SDO Info service
SDO Info object names
2 RX-PDOs and 2 TX-PDOs
object dictionary containing objects of various data types
virtual objects
s7_stm32f411x:
SDO read and write
SDO Info service
SDO Info object names
2 RX-PDOs and 2 TX-PDOs
object dictionary containing objects of various data types
FoE mailbox service
BOOTSTRAP NMT mode
s9_stm32f411x:
SDO read and write
2 RX-PDOs and 2 TX-PDOs
object dictionary containing objects of various data types
dynamic PDO mapping with extension module usr_dynPdoMapping
s10_stm32f411x_xxx:
Interrupt handling
xxx = isr: PDI Events are handled in an ISR
xxx = isr_dc: PDI Events and DC Events are handled in separate ISRs
s11_stm32f411x_cia402
EtherCAT slave with CiA 402 profile example application