ASIX AX58200 User manual

1
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
Revision 1.10
March 26th, 2020
AX58200 GPIO / AIO
User Guide

2
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
Revision History
Revision
Date
Description
0.10
2019/12/10
Initial release
0.20
2019/12/11
Added chapter 7 for ADC / DAC description
0.30
2019/12/13
Corrected chapter 5-3, chapter 6 and add chapter 8 for Switch ID description
1.00
2020/01/03
Corrected chapter 6-1, supplementary note rotary dip switch of chapter 8
1.10
2020/03/26
1. Added IAR EWARM description in chapter 2 and chapter 5
2. Added chapter 9 for describing firmware upgrade through Ethercat FoE
3. Added chapter 10 for shortest Ethercat cycle evaluation

3
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
CONTENT
1. Introduction ....................................................................................................................7
2. Requirements..................................................................................................................7
3. Board Description.........................................................................................................10
3-1 AX58200-TSB......................................................................................10
3-2 AX58200-EXB-ADIO............................................................................11
4. Basic Operation of TwinCAT .......................................................................................12
4-1 Open XAE through Visual Studio 2010 / 2013......................................12
4-2 Project creation & download EEPROM ................................................12
5. Download Firmware to AX58200 .................................................................................21
5-1 Mass Storage Method..........................................................................22
5-2 NUVOTON ICP Tool Method................................................................23
5-3 ARM KEIL MDK Method.......................................................................28
5-4 IAR EWARM Method............................................................................31
5-5 Check Firmware Status by Debug Port.................................................33
6. PLC Application............................................................................................................35
6-1 Import PLC...........................................................................................35
6-2 PD Link ................................................................................................41
6-3 Link Reference.....................................................................................43
6-4 Execution PLC .....................................................................................44
7. ADC / DAC Description ................................................................................................47
8. Switch ID Description...................................................................................................48
9. Firmware Upgrade through EtherCAT FoE ................................................................56
10. Shortest EtherCAT Cycle Evaluation........................................................................59

4
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
List of figure
Figure 2 - 1 ..........................................................................................................................................................7
Figure 2 - 2 ..........................................................................................................................................................8
Figure 2 - 3 ..........................................................................................................................................................8
Figure 2 - 4 ..........................................................................................................................................................8
Figure 2 - 5 ..........................................................................................................................................................9
Figure 3 - 1 ........................................................................................................................................................10
Figure 3 - 2 ........................................................................................................................................................11
Figure 4 - 1 ........................................................................................................................................................12
Figure 4 - 2 ........................................................................................................................................................12
Figure 4 - 3 ........................................................................................................................................................13
Figure 4 - 4 ........................................................................................................................................................13
Figure 4 - 5 ........................................................................................................................................................14
Figure 4 - 6 ........................................................................................................................................................14
Figure 4 - 7 ........................................................................................................................................................14
Figure 4 - 8 ........................................................................................................................................................15
Figure 4 - 9 ........................................................................................................................................................15
Figure 4 - 10 ......................................................................................................................................................16
Figure 4 - 11 ......................................................................................................................................................16
Figure 4 - 12 ......................................................................................................................................................16
Figure 4 - 13 ......................................................................................................................................................17
Figure 4 - 14 ......................................................................................................................................................17
Figure 4 - 15 ......................................................................................................................................................18
Figure 4 - 16 ......................................................................................................................................................18
Figure 4 - 17 ......................................................................................................................................................19
Figure 4 - 18 ......................................................................................................................................................19
Figure 4 - 19 ......................................................................................................................................................19
Figure 4 - 20 ......................................................................................................................................................19
Figure 4 - 21 ......................................................................................................................................................20
Figure 5 - 1 ........................................................................................................................................................21
Figure 5 - 2 ........................................................................................................................................................22
Figure 5 - 3 ........................................................................................................................................................22
Figure 5 - 4 ........................................................................................................................................................23
Figure 5 - 5 ........................................................................................................................................................23
Figure 5 - 6 ........................................................................................................................................................24
Figure 5 - 7 ........................................................................................................................................................24
Figure 5 - 8 ........................................................................................................................................................25
Figure 5 - 9 ........................................................................................................................................................25
Figure 5 - 10 ......................................................................................................................................................26
Figure 5 - 11 ......................................................................................................................................................26
Figure 5 - 12 ......................................................................................................................................................27
Figure 5 - 13 ......................................................................................................................................................28
Figure 5 - 14 ......................................................................................................................................................28
Figure 5 - 15 ......................................................................................................................................................29
Figure 5 - 16 ......................................................................................................................................................29
Figure 5 - 17 ......................................................................................................................................................30
Figure 5 - 18 ......................................................................................................................................................30
Figure 5 - 19 ......................................................................................................................................................31
Figure 5 - 20 ......................................................................................................................................................31
Figure 5 - 21 ......................................................................................................................................................32
Figure 5 - 22 ......................................................................................................................................................33
Figure 5 - 23 ......................................................................................................................................................33
Figure 5 - 24 ......................................................................................................................................................34

5
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
Figure 5 - 25 ......................................................................................................................................................34
Figure 6 - 1 ........................................................................................................................................................35
Figure 6 - 2 ........................................................................................................................................................35
Figure 6 - 3 ........................................................................................................................................................36
Figure 6 - 4 ........................................................................................................................................................36
Figure 6 - 5 ........................................................................................................................................................37
Figure 6 - 6 ........................................................................................................................................................37
Figure 6 - 7 ........................................................................................................................................................38
Figure 6 - 8 ........................................................................................................................................................38
Figure 6 - 9 ........................................................................................................................................................39
Figure 6 - 10 ......................................................................................................................................................39
Figure 6 - 11 ......................................................................................................................................................40
Figure 6 - 12 ......................................................................................................................................................40
Figure 6 - 13 ......................................................................................................................................................41
Figure 6 - 14 ......................................................................................................................................................41
Figure 6 - 15 ......................................................................................................................................................42
Figure 6 - 16 ......................................................................................................................................................42
Figure 6 - 17 ......................................................................................................................................................43
Figure 6 - 18 ......................................................................................................................................................44
Figure 6 - 19 ......................................................................................................................................................44
Figure 6 - 20 ......................................................................................................................................................44
Figure 6 - 21 ......................................................................................................................................................45
Figure 6 - 22 ......................................................................................................................................................45
Figure 6 - 23 ......................................................................................................................................................46
Figure 6 - 24 ......................................................................................................................................................46
Figure 7 - 1 ........................................................................................................................................................47
Figure 8 - 1 ........................................................................................................................................................48
Figure 8 - 2 ........................................................................................................................................................48
Figure 8 - 3 ........................................................................................................................................................49
Figure 8 - 4 ........................................................................................................................................................49
Figure 8 - 5 ........................................................................................................................................................50
Figure 8 - 6 ........................................................................................................................................................50
Figure 8 - 7 ........................................................................................................................................................51
Figure 8 - 8 ........................................................................................................................................................51
Figure 8 - 9 ........................................................................................................................................................51
Figure 8 - 10 ......................................................................................................................................................52
Figure 8 - 11 ......................................................................................................................................................52
Figure 8 - 12 ......................................................................................................................................................53
Figure 8 - 13 ......................................................................................................................................................53
Figure 8 - 14 ......................................................................................................................................................54
Figure 8 - 15 ......................................................................................................................................................54
Figure 8 - 16 ......................................................................................................................................................55
Figure 9 - 1 ........................................................................................................................................................56
Figure 9 - 2 ........................................................................................................................................................56
Figure 9 - 3 ........................................................................................................................................................57
Figure 9 - 4 ........................................................................................................................................................57
Figure 9 - 5 ........................................................................................................................................................58
Figure 9 - 6 ........................................................................................................................................................58
Figure 10 - 1 ......................................................................................................................................................59
Figure 10 - 2 ......................................................................................................................................................59
Figure 10 - 3 ......................................................................................................................................................60

6
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
List of Table
Table 5 - 1..........................................................................................................................................................30
Table 6 - 1..........................................................................................................................................................43

7
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
1. Introduction
This document introduces how to setup entire environment for GPIO / AIO application on AX58200 evaluation
platform (TSB + EXB-ADIO boards). The demo application of EtherCAT master side develops by PLC
(Programmable Logic Controller) language through BECKHOFF TwinCAT engineering (XAE). The IDE rely
Microsoft Visual Studio 2010 / 2013. We can execute the application through the mentioned IDE or pure
BECKHOFF runtime package (XAR). The firmware part of EtherCAT slave side develops by C language
through ARM KEIL MDK (Microcontroller Development Kit).
The firmware part mainly handles below affairs:
⚫BECKHOFF SSC (Slave Stack Code)
⚫Hardware access of SSC through SPI interface at MCU side
⚫Simple object form for CIA-401 digital/analog IO
⚫Peripherals (GPIO / ADC / DAC) accessed by EtherCAT PD (Process Data)
The PLC part mainly handles below affairs:
⚫PD mapping / handling by PLC for GPIO / AIO
⚫A demo GUI
2. Requirements
Before starting to setup the environment, we should prepare some software and hardware. Of course, they
are all running based on general desktop PC with windows 7 / 10 operation systems. We list software /
hardware requirements as following:
[Software at EtherCAT master side]
⚫Windows 7 / 10 operation system
⚫Microsoft Visual Studio 2010 / 2013
⚫Beckhoff TwinCAT XAE v3.1.4022.28 or later
Figure 2 - 1
Note: You can download the BECKHOFF TwinCAT here or contact ASIX Electronics Corporation.

8
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
[Software at EtherCAT slave side]
⚫ARM KEIL MDK micro-Vision 5 (for development only)
Figure 2 - 2
⚫IAR EWARM v7.40 or later (for development only)
Figure 2 - 3
[Hardware]
⚫AX58200 Test Board (AX58200-TSB) x 1
Figure 2 - 4

9
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
⚫AX58200 ADIO Expansion Board (AX58200-EXB-ADIO) x 1
Figure 2 - 5

10
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
3. Board Description
3-1 AX58200-TSB
AX58200-TSB is a test / evaluation board for AX58200 IC and has below components:
⚫AX58200 –An ASIX IC that integrated an ESC (EtherCAT Slave Controller) + an ARM cortex-M4
⚫ESC Port0 –Port0 of the ESC
⚫ESC Port1 –Port1 of the ESC
⚫NUC12SRE3DE –A NUVOTON IC with ICE functionality for development / debug
⚫Offline programming button –This button is used for offline programming through the ICE
⚫Debug Port –Debug port of the ICE
⚫DIP of ICE –Dip switch for select mode of the debug port
⚫USB2.0 OTG –USB2.0 OTG port of AX58200
⚫Power –Power input port of AX58200-TSB
⚫Reset –Reset button of AX58200
Figure 3 - 1

11
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
3-2 AX58200-EXB-ADIO
AX58200-EXB-ADIO is an expansion board for AX58200 GPIO / AIO application and has below components:
⚫LED for Digital Output –Digital output (8-bit) to the LEDs
⚫DIP Switch for Digital Input –Dip switch to the digital input (8-bit)
⚫Analog Input Pin –You can measure the input voltage of ADC by this PIN
⚫Analog Output Pin –You can measure the output voltage of DAC by this PIN
⚫Variable Resistance –You can adjust input voltage of ADC through this component
⚫ESC Port2 –Port2 of the ESC
⚫Rotary Dip Switch –A rotary dip switch that can assign a 16-bit digits
⚫RS232 Port –The I/O of this RS232 port comes from UART of AX58200-TSB
Figure 3 - 2

12
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
4. Basic Operation of TwinCAT
Before starting up the AX58200-TSB first time, you MUST download available contents into AX58200
EEPROM first. If there are no available contents in AX58200 EEPROM, the MCU will be reset forcibly
by ESC.
Assume you already installed the BECKHOFF TwinCAT XAE in your environment.
Please follow below sections for EEPROM download.
4-1 Open XAE through Visual Studio 2010 / 2013
Open the XAE by clicking below system tray icon:
Figure 4 - 1
4-2 Project creation & download EEPROM
Any common deploy or applications through TwinCAT XAE all should process under a TwinCAT project. We
create an empty TwinCAT project and scan out etherCAT slave that linked to the master. If you have a
Beckhoff real-time compatible network adapter (ex: Intel I-350) in the system, TwinCAT master can bundle
the adapter as main etherCAT port. If you have 2 adapters, the second adapter can be used for deploy
redundancy. Whatever, you should create a TwinCAT project first for any etherCAT related affairs under
TwinCAT XAE. Please refer to below steps:
⚫Step 1: Click the “New TwinCAT Project…”
Figure 4 - 2

13
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
⚫Step 2: Specify “Name”and “Location”and click “OK”.
Figure 4 - 3
⚫Step 3: Click the “TWINCAT -> Show Realtime Ethernet Compatible Devices…”
Figure 4 - 4

14
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
⚫Step 4: Make sure your network adapter installed BECKHOFF EtherCAT real-time driver
If not installed, please click “Install”.
Figure 4 - 5
⚫Step 5: Please copy the ESI (EtherCAT Slave Information) file “AX58200_GPIO_8Bit_AIO_16bit.xml”
from the BSP directory:
“YOUR_BSP_FOLDER\SampleCode\Ethercat_GPIO_AIO_Reference_Design\For_
TwinCAT\ESI\”
Figure 4 - 6
⚫Step 6: Copy the file to TwinCAT directory: “C:\TwinCAT\3.1\Config\Io\EtherCAT\”
Figure 4 - 7

15
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
⚫Step 7: Click “TWINCAT -> EtherCAT Devices -> Reload Device Descriptions”.
Figure 4 - 8
⚫Step 8: Plug USB power and connect ESC port0 to TwinCAT master port.
Figure 4 - 9

16
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
⚫Step 9: Right-click on “IO / Devices”and select “Scan”.
Figure 4 - 10
⚫Step 10: Choose main network adapter.
Figure 4 - 11
⚫Step 11: Click “Yes”.
Figure 4 - 12

17
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
⚫Step 12: Click “Yes”.
Figure 4 - 13
⚫Step 13: Double click “Device N (EtherCAT)”and you will see the TwinCAT master scanned out the
EtherCAT slave
Figure 4 - 14

18
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
⚫Step 14: Select the slave, right-click and choose “EEPROM Update…”
Figure 4 - 15
⚫Step 15: Select the “AX58200_GPIO_8Bit_AIO_16Bit”and click “OK”.
Figure 4 - 16

19
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
⚫Step 16: Wait for progress bar at lower right corner of the TwinCAT screen.
Figure 4 - 17
⚫Step 17: Select “Device N (EtherCAT)”, right-click and choose “Remove”.
Figure 4 - 18
⚫Step 18: Click “Yes”.
Figure 4 - 19
⚫Step 19: Execute “Scan”again (repeat Step 7 ~ 11) and you will see below screen.
Assume AX58200 did not download available firmware with Slave Stack Code yet.
So the state field “INIT INIT_ERR”is properly / reasonable.
Figure 4 - 20

20
Copyright (C) 2019-2020 Reserved by ASIX Electronics Corporation, All Rights Reserved.
AX58200
GPIO / AIO User Guide
Reference Design User Guide
If there is an available firmware with Slave Stack Code in AX58200, you should see below
screen. The “State”field is “OP”mode.
Figure 4 - 21
Note: Please refer to Chapter 5 for download firmware.
Other manuals for AX58200
2
Table of contents
Other ASIX Controllers manuals
Popular Controllers manuals by other brands

Peter electronic
Peter electronic VersiStart i II Commissioning instructions

Satel
Satel ACU-250 Installer manual

Altronix
Altronix StrikeIt1 installation guide

Sartorius
Sartorius PR 5610 installation manual

EbV elektronik
EbV elektronik CETA 106 operating manual

Emerson
Emerson AMPGARD RVSS Instruction booklet