ARM Technical Support Knowledge Articles

Using ULINKpro on the STM3240G-EVAL Board

Applies to: ULINK USB-JTAG Debugger

Answer


Information in this knowledgebase article applies to:


SYMPTOM

When downloading or debugging a STM3240G-EVAL board using ULINKpro, the following error displays:

Trace HW not present

ULINK2 and ULINK-ME work properly without any errors. Jumpers JP1 and JP2 are positioned properly (pins 1-2).

CAUSE

The STM3240G-EVAL board has an issue with high speed SWV and ETM trace when using the ULINKpro.  The ULINK2 and ULINK-ME are not affected as they cause the SWV data to be output at the SWO pin at relatively slow data rates. The problem may be due to length of the ETM signal trace on the STM3240G EVAL board.  The trace for this signal should always be as short as possible.

Note: The Keil MCBSTM32F200 and MCBSTM32F400 boards do not have this problem.

RESOLUTION

Because the ULINKpro can capture SWV trace information via the SWO port, or capture both SWV and ETM trace information via the 4-bit ETM Trace Port, there are 2 possible solutions:

Using the SWO Trace port :

In your uVision project,

  1. Select Options for Target (ALT-F7) and select the Debug tab.
  2. Make sure you are enabling the debug hardware using the STM32F4xx_SWO.ini file. DBG_SLEEP, DBG_STOP, DBG_STANDBY and TRACE_IOEN must be set in this file. TRACE_MODE should be set to Asynchronous.
  3. Click the Settings button, the click the Trace tab. Select the Serial Wire Output - Manchester option for Trace Port.
  4. If the Core Clock rate is 168.000000, just uncheck the Autodetect checkbox, then set the SWO Clock Prescaler to 2.  Otherwise, just set the Core Clock rate to 84.000000.
  5. Click OK, then OK again to save your changes.

ULINKpro should connect properly, and capture the SWO trace information output from the STM3240G-EVAL board.

Using the 4-bit ETM Trace Port:

You must reduce the CPU clock rate to 60 MHz. This requires a modification to the system_stm32f4xx.c file. Source lines 145 - 155 define the constants PLL_M, PLL_N, PLL_P and PLL_Q. Below are the settings for different clock speeds:


60 MHz 120 MHz 168 MHz
PLL_M 25
25
25
PLL_N 240
240
336
PLL_P 4
2
2
PLL_Q 5
7
7

Modify these #define values for the 60 MHz settings in the above table, rebuild the source files and program the Flash.

In your uVision project,

  1. Select Options for Target (ALT-F7) and select the Debug tab.
  2. Make sure you are enabling the debug hardware using the STM32F4xx_TP.ini file. DBG_SLEEP, DBG_STOP, DBG_STANDBY and TRACE_IOEN must be enabled in this file. TRACE_MODE should be set to Synchronous: TRACEDATA Size 4.
  3. Click the Settings button, the click the Trace tab. Select the Sync Trace Port with 4-bit Data option for Trace Port.
  4. Set the Core Clock rate to 60.000000.
  5. Click OK, then OK again to save your changes.

ULINKpro should connect properly, and capture ETM Trace information output from the STM3240G-EVAL board.

MORE INFORMATION

SEE ALSO

ATTACHED FILES

Request the files attached to this knowledgebase article.

Article last edited on: 2012-04-12 15:31:24

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential