Holtek HT32 Series Troubleshooting Manual

Hide thumbs Also See for HT32 Series:

Advertisement

Troubleshooting Guide for HT32 MCU SWD
Interface Usage Problems
D/N: AN0677EN
Introduction
Holtek HT32 series of MCUs are based on an Arm
Serial Wire Debug (SWD) ports namely SW-DP/SWJ-DP, which makes development,
programming and debugging more convenient. However, during hardware design when using the
SWD, users may encounter some abnormal situations, which affect project development. This
application note provides users with a comprehensive troubleshooting guide for SWD interface
problems and includes possible errors which may occur during connection, communication and
other conditions. This guide will assist users to use the SWD interface more easily, saving
development time to make the project more efficient.
Holtek has released a USB debugging tool named e-Link32 Pro/Lite, which has been developed
based on the Arm
port, users can program and debug the program on the target MCU via the SWD under the
development environment or with a programming tool. The following figure shows the connection
relations. This text will take the e-Link32 Pro/Lite as an example to introduce the SWD, common
error messages and troubleshooting steps. The SWD related instructions and debug information are
also used for a common USB debug adapter such as ULINK2 or J-Link.
AN0677EN V1.00
Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems
®
CMSIS-DAP reference design. By connecting the target board to the PC's USB
Host PC
USB
USB Host
Figure 1. SWD Connection Diagram
1 / 18
Cortex
-M core. The core contains integrated
®
®
e-Link32 Pro / Lite
SWD
CMSIS-DAP
Target MCU
SW-DP
May 21, 2024

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HT32 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Holtek HT32 Series

  • Page 1 This guide will assist users to use the SWD interface more easily, saving development time to make the project more efficient. Holtek has released a USB debugging tool named e-Link32 Pro/Lite, which has been developed based on the Arm ®...
  • Page 2 Programming, offline programming and debugging. Refer to the e-Link32 Pro User Guide for details.  e-Link32 Lite: this is a Holtek Starter Kit internal USB Debug adapter, which can directly program or debug on the target MCU without additional connections. Refer to the Starter Kit User Manual for details.
  • Page 3 Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems  SWCLK (Serial Wire Clock): a clock signal from the debug adapter for synchronous data transmission. A traditional Joint Test Action Group (JTAG) interface requires four connection pins, while the SWD only requires two pins to communicate. Therefore, the SWD requires fewer pins and is more convenient to use.
  • Page 4 “Devices” and find “Other devices” from the drop-down menu. Then check whether a device named “CMSIS-DAP” or “Holtek CMSIS-DAP” appears, as shown in the following figure. It should be noted that different computer systems may have slightly different displays.
  • Page 5 Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems Keil Debug Settings This section will take e-Link32 Pro/Lite as an example to illustrate the debug settings under the Keil development environment. Use the following steps to check step by step whether the settings are correct.
  • Page 6 Loader cannot be found, install the Holtek DFP. Click on “Project - Manage - Pack Installer…” to find the Holtek DFP and install. Refer to the Arm Developer website or download the HT32 Firmware Library. Find “Holtek.HT32_DFP.latest.pack”in the root directory and install.
  • Page 7 1. Click “General Options  Target” and select the target MCU as the Device. If the corresponding MCU cannot be found, download the “HT32_IAR_Package_Vx.x.x.exe” from the Holtek official website to install the IAR Support Package. Figure 11. IAR - General Options 2.
  • Page 8 Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems 3. Select the “Interface” tab in “CMSIS DAP” and select “SWD” as Interface Figure 13. IAR - CMSIS DAP Check whether the SWD is correctly connected When taking Keil as an example, click on “Project  Options for Target” to select the “Debug” tab and click “Settings”...
  • Page 9 Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems Figure 15. Keil - Target Driver Setup - Debug Connect Under Reset Connect Under Reset is a feature of the MCU core and SW-DP to pause the system before the program is executed.
  • Page 10: Common Error Messages

    Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems Common Error Messages The following table shows a summary of common error messages between Keil and IAR. Error Message Troubleshooting “No Debug Unit Device found” Refer to “Troubleshooting Step 2” “SWD/JTAG Communication Failure” Check one by one from “Troubleshooting Step 3” (1) Check whether the image size exceeds the specification “Error: Flash Download failed - (2) Check the Keil - Flash Download setting...
  • Page 11 Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems Keil - Message “Error: Flash Download failed - “Cortex-Mx” ” Figure 19. Keil - Message “Error: Flash Download failed - “Cortex-Mx” ” 1. First check whether the compiled “Code Size + RO-data + RW-data Size” exceeds the target MCU specifications.
  • Page 12 Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems IAR - Message “Fatal error: Probe not found” Figure 22. IAR- Message “Fatal error: Probe not found” When the debug adapter is not connected to the PC, refer to “Troubleshooting Step 2” and “Step 13”.
  • Page 13: Troubleshooting

    Check whether the MCU SWDIO, SWCLK and nRST pins are actually connected to the debug adapter. Check whether the cable is not broken or the connection is disconnected. If the Holtek ESK32 Starter Kit is used, ensure that the Switch-S1 on the board is switched to “On”.
  • Page 14 Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems Figure 25. Keil - Target Driver Setup - Max Clock IAR: click “CMSIS DAP” in “Project  Options” and click the “Interface” tab to adjust the interface speed, as shown in the following figure. Figure 26.
  • Page 15 Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems Step 7. Check whether the Boot pin setting is correct? If the programming operation has been successful but the program does not execute, check whether the BOOT pin has been externally pulled-low. If yes, then remove this external signal. After a power-on or reset, the BOOT pin must be kept at a high level, after which the program in the Main Flash memory can execute normally.
  • Page 16 Troubleshooting Guide for HT32 MCU SWD Interface Usage Problems Select Connect “under Reset”, as shown in the following figure. Now the IDE can then program using the SWD normally. It is recommended to first erase the firmware in the Main Flash (refer to “Step 11”...
  • Page 17 Pro/Lite firmware to the latest version. Download the new e-Link32 Pro ICP Tool from the Holtek official website and click on “Connect”. If the e-Link32 Pro Lite version is older, an update message will automatically pop up, then click on “OK”...
  • Page 18: Reference Material

    Information displayed at such sites. Hyperlinks to other websites are at your own risk. Limitation of Liability In no event shall Holtek Limited be liable to any other party for any loss or damage whatsoever or howsoever caused directly or indirectly in connection with your access to or use of this website, the content thereon or any goods, materials or services.

Table of Contents