1. Introduction Reference Design User Guide This document introduces how to setup entire environment for GPIO / AIO application on AX58100 evaluation platform (NUCLEO-F303RE + AX58100-EVB-SSPDI boards). The demo application of EtherCAT master side is developed using PLC (Programmable Logic Controller) language running on BECKHOFF TwinCAT engineering (XAE).
In this reference design, two types of Integration Development Environment (IDE) could be supported, you can choose one for the development. ◼ ARM KEIL MDK micro-Vision 5 or later (for development only) Figure 2-3 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 8
Figure 2-4 ⚫ STM32CubeProgrammer You can download the STM32CubeProgrammer here. Figure 2-5 ⚫ SSC Tool V5.13 (for development only) You can download the SSC Tool from EtherCAT Technology Group (ETG) here Figure 2-6 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 9
Reference Design User Guide Figure 2-7 ⚫ AX58100-EVB-SSPDI-1 V1.0 EVB x 1 PCS For more details, please refer to the link below and the following chapter. ASIX official link: https://www.asix.com.tw/ Figure 2-8 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
3. Board Description Reference Design User Guide 3-1 AX58100-EVB Evaluation Board AX58100-EVB is an EtherCAT Slave Controller (ESC) Evaluation Board with AX58100 IC, please refer to ASIX official website as below for more detail. https://www.asix.com.tw/en/product/IndustrialEthernet/EtherCAT/AX58100 The AX58100-EVB-SSPDI is an evaluation board designed for the AX58100 IC and includes the following components: ⚫...
ST-LINK debugger/programmer. Free software libraries and examples are available via the STM32Cube MCU Package. For more details, visit the official product page: https://www.st.com/en/evaluation-tools/nucleo-f303re.html The NUCLEO-F303RE functions as the control board for the AX58100 GPIO / AIO application and provides the following components: ⚫...
4. Environment Setup Reference Design User Guide 4-1 Hardware Connectivity Please refer to the diagram below to see the combination of the NUCLEO-F303RE and AX58100-EVB-SSPDI. J8 (AX58100-EVB-SSPDI) connects to CN10 (NUCLEO-F303RE), and J9 (AX58100-EVB-SSPDI) connects to CN7 (NUCLEO-F303RE). Connect the “EtherCAT Port 0” and “USB Port” to your host:...
Step 2: Searching part number “STM32F303RET6”, then select it on “MCUs/MPU List” and press “Start Project” to create project. Figure 5-2 Notice: In order to keep the corrected reference path in BSP, please save the project folder in the path below. BSP_ROOT\SampleCode\ Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Step 1: Disable the “Pinout & Configuration > System Core > RCC > High Speed Clock (HSE)” setting as the figure below. Figure 5-3 Step 2: Add pin assignment as the below in “Pinout & Configuration > System Core > GPIO > GPIO”. Figure 5-4 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 15
Step 3: Add pin assignment for ADC, DAC, SPI2, USART2, SYS as below. Reference Design User Guide Figure 5-5 Step 4: Enable ADC1 as the settings highlighted in red. Figure 5-6 Step 5: Enable DAC with the setting highlighted in red. Figure 5-7 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 16
Step 6: Activated TIM6 & TIM7 as the setting below. Reference Design User Guide Figure 5-8 Step 7: Enable SPI2 with the setting below. Figure 5-9 Step 8: Enable USART2 for debug console as the setting below. Figure 5-10 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 17
Reference Design User Guide Figure 5-11 Step 10: Adjusting the clock tree in “Clock Configuration” page. Press “NO” to ignore auto solver process, then modify the settings as the red highlighted below. Figure 5-12 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
AX58100 GPIO / AIO User Guide 5-4 Source Code Adjustment Reference Design User Guide Step 1: Add the AX58100 source package. Copy the folders as below to your STM32CubeMX project folder. BSP_ROOT\SampleCode\Ax58100_GpioAio\AX58100 BSP_ROOT\SampleCode\Ax58100_GpioAio\Binary BSP_ROOT\SampleCode\Ax58100_GpioAio\For_SSC_Tool BSP_ROOT\SampleCode\Ax58100_GpioAio\For_TwinCAT Copy the folders as below to your root folder.
Page 21
AX58100 GPIO / AIO User Guide Step 4: Modify source code. As highlighted in the figure below, modify file content in the path: BSP_ROOT\SampleCode\Ax58100_GpioAio\Core\Src\main.c Reference Design User Guide Figure 5-19 Figure 5-20 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 22
AX58100 GPIO / AIO User Guide Reference Design User Guide Figure 5-21 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 23
AX58100 GPIO / AIO User Guide Reference Design User Guide Figure 5-22 Figure 5-23 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 24
AX58100 GPIO / AIO User Guide Reference Design User Guide Figure 5-24 As highlighted in the figure below, modify file content in the path: BSP_ROOT\SampleCode\Ax58100_GpioAio\Core\Src\stm32f3xx_it.c Figure 5-25 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Assume the SSC tool has been installed, the related files needed are as below. SSC tool project file: BSP_ROOT \SampleCode\Ax58100_GpioAio\For_SSC_Tool\AX58100_GPIO_8Bit_AIO_12Bit.esp Configuration file for custom import: BSP_ROOT\SampleCode\Ax58100_GpioAio\For_SSC_Tool\Import\Configuration\AsixAx58100GpioAio Configurations.xml Excel file for application import: BSP_ROOT\SampleCode\Ax58100_GpioAio\For_SSC_Tool\Import\Configuration\files\AX58100_GPIO_ 8Bit_AIO_12Bit.xlsx Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Click on “Project > Options for Target ‘xxxx’… > Utilities > Settings”, then select “Flash Download” page to add “Programming Algorithm” as the value below. Figure 5-28 Start = 0x08004000, Size = 0x0003D800 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 27
Find the setting of “Project > Options for Target ‘xxxx’… > Target > Read/Write Memory Areas”, then modify it as the value below. Figure 5-31 IROM1 Start = 0x8004000, Size = 0x3D800 Now, entire building procedure has done for Keil MDK IDE. Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 28
Double clicks the file as below to open project. BSP_ROOT\SampleCode\Ax58100_GpioAio\STM32CubeIDE\.project Reference Design User Guide Step 1: Add source code. On “Project Explorer”, add virtual folders and linking the source files. Figure 5-32 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 29
> Folder is not located in the file system (Virtual Folder)”. Reference Design User Guide Figure 5-33 ◼ Add File Link: Select and drag the files onto the created virtual folder. Figure 5-34 Figure 5-35 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 30
Select target project, then find setting on “Project > Properties > C/C++ Build > Settings > Tool Settings > MCU/MCP GCC Compiler > Include paths”, then add paths as the figure below. Figure 5-37 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 31
Reference Design User Guide Figure 5-38 Post-build steps Command: ../../../../Tools/FileInfoAdder Ax58100_GpioAio.bin ../../For_TwinCAT/FoE/AX58100_GpioAio.efw Now, entire building procedure has done for STM32CubeIDE. So far, the entire project source has been ready for building firmware binary. Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
⚫ For STM32CubeIDE: Step 1: Double clicks the file as below to open project. BSP_ROOT\SampleCode\Ax58100_GpioAio\STM32CubeIDE\.project Step 2: Select the project node and execute “Build Project” under “Menu Bar > Project”. Figure 6-2 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Step 1: Click “Menu bar > Flash > Download” to download firmware into MCU. Figure 6-4 ⚫ For STM32CubeIDE: Step 1: Click “Menu bar > Run > Run As > STM32 C/C++ Application” to download firmware into MCU. Figure 6-5 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 34
◼ For Keil MDK IDE: BSP_ROOT\SampleCode\Ax58100_GpioAio\MDK-ARM\Ax58100_GpioAio\ Ax58100_GpioAio.bin ◼ For STM32CubeIDE: BSP_ROOT\SampleCode\Ax58100_GpioAio\STM32CubeIDE\Debug\Ax58100_GpioAio.bin Please ensure the “Start address” is 0x08004000. Figure 6-6 Step 3: Press “Start Programming” button to download GPIO / AIO firmware. Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Open the COM port. If no characters appear in COM port, you can press “Reset” button to confirm again. Below screen shows the firmware of the EtherCAT Slave Stack working successfully. Figure 6-8 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
The .efw file is dedicate use for FoE transfer, it’s a firmware binary file with 32-bytes header pre-fix. Every time the project build done, the .efw file will auto be generated in the path below by “FileInfoAdder.exe” utility. BSP_ROOT\SampleCode\Ax58100_GpioAio\For_TwinCAT\FoE\AX58100_GpioAio.efw Figure 9-2 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Step 2: Select firmware binary file for FoE in the path below. “BSP_ROOT\SampleCode\Ax58100_GpioAio\For_TwinCAT\FoE\AX58100_GpioAio.efw” Step 3: Click OK to start firmware upgrading. Figure 9-4 Step 4: Wait the process complete, the dialog will pop up as below if upgrading is successfully done. Figure 9-5 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
In virtual ADIO Mode, analog I/O value is set to 0x123, the digital IO value is set to 0x45 and enable the dashboard: adio -ve 1 -vai 123 -di 45 -dsb In physical ADIO Mode, enable the dashboard: adio -ve 0 -dsb Table 10-1 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
This example provides both physical pins and the ability to set virtual values to simulate the Rotary Dip Switch through Console commands. However, the physical pins require an actual rotary switch to be connected externally. The diagram below provides a pinout reference for SW0-7. Figure 11-2 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 41
This setting will make TwinCAT master enable the identification function for the slave. Select the slave, right-click and select “Advanced Settings…”. Reference Design User Guide Figure 11-3 Go to “General -> Behavior” and turn on the “Check Identification”. Figure 11-4 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 42
Assuming users are already familiar with executing commands via the console, otherwise, users can refer to Section 6.4 and Chapter 10. Command: adio -ve 1 -vsw 37 -dsb Figure 11-6 Click the "Reload Devices" button, and the state will change to "OP." Figure 11-7 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 43
Go to “ESC Access -> Memory” in “Advanced Settings” and check out the address 0x0012. Figure 11-9 You can append an EtherCAT command to TwinCAT master for confirm the second address. Click “Device N (EtherCAT) -> Append EtherCAT Cmd”. Figure 11-10 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 44
Figure 11-11 Double-click “Cmd 1” and setup “Slave Address” and “Address Offset”. I setup slave address = 0xba and address offset = 0x12 in this example. Figure 11-12 Clicked “Activate Configuration”. Figure 11-13 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 45
Click “Device N (EtherCAT) -> Cmd 1 -> DATA”, you will see the command get the value of ESC register 0x0012 back successfully. It is correct, the “0x00ba” in UINT data type. Figure 11-15 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
GPIO / AIO User Guide 12. Shortest EtherCAT Cycle Evaluation Reference Design User Guide We tried to decrease the TwinCAT cycle to evaluate shortest cycle of AX58100 GPIO / AIO. “100us” Shortest workable cycle of AX58100 GPIO / AIO is now.
Page 47
GPIO / AIO User Guide The slave stack also does not indicate any errors in SM output parameter / SM input parameter objects of CoE-Online table. Reference Design User Guide Figure 12-3 Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Page 48
(4) You may not alter, modify, copy or otherwise misappropriate any ASIX electronic product, whether in whole or in part. ASIX Electronics shall not be liable for any loss incurred by you or a third party as a result of altering, modifying, copying or otherwise misappropriating ASIX Electronics products.
Page 49
No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, for any purpose, without the express written permission of ASIX. ASIX may make changes to the product specifications and descriptions in this document at any time, without notice.
Page 50
AX58100 GPIO / AIO User Guide Reference Design User Guide 4F, No.8, Hsin Ann RD., Hsinchu Science Park, Hsinchu, Taiwan, R.O.C. TEL: +886-3-5799500 FAX: +886-3-5799558 Email: support@asix.com.tw Web: https://www.asix.com.tw Copyright (C) 2025 Reserved by ASIX Electronics Corporation...
Need help?
Do you have a question about the AX58100 and is the answer not in the manual?
Questions and answers