2014-10-23 09:03 AM
I recently purchased a STM324F29I-EVAL board. I am using Keil uVision 5 along with a ULINK Pro debug probe. I have been able to get the basic ITM trace to work via SWO however the 4 bit ETM trace I am not able to get working. I've verified that pinsPE2 - PE6 are enabled and reconfigured for trace functions by a debugger script. I've tried it at various CPU clock frequencies even as low as running the core directly off the HSI of 16mhz but I still get a No Synchronization error in the debugger. There is no problem with my debug probe as I can run the full 4-bit ETM trace on another project I have that uses the LPC1769 MCU. Has anyone else experienced any issues with the ETM trace with this part or the eval board?
* edit: I've attached the debugger initialization file */******************************************************************************/
/* STM32_TP.ini: STM32 Debugger Initialization File */
/******************************************************************************/
// <<<
Use
Configuration Wizard in Context Menu >>> //
/******************************************************************************/
/* This file is part of the uVision/ARM development tools. */
/* Copyright (c) 2005-2014 Keil Software. All rights reserved. */
/* This software may only be used under the terms of a valid, current, */
/* end user licence from KEIL for a compatible version of KEIL software */
/* development tools. Nothing else gives you the right to use this software. */
/******************************************************************************/
FUNC void DebugSetup (void) {
_WDWORD(0x40023830, _RDWORD(0x40023830) | 0x00000010); // RCC_AHB1ENR: IO port E clock enable
_WDWORD(0x40021000, 0x00002AA0); // GPIOE_MODER: PE2..PE6 = Alternate function mode
_WDWORD(0x40021008, 0x00003FF0); // GPIOE_OSPEEDR: PE2..PE6 = 100 MHz speed
_WDWORD(0x4002100C, 0x00000000); // GPIOE_PUPDR: PE2..PE6 = No Pull-up/Pull-down
_WDWORD(0x40021020, 0x00000000); // GPIOE_AFRL: PE2..PE6 = AF0
// <
h
> Debug MCU Configuration
// <
o1.0
> DBG_SLEEP <
i
> Debug Sleep Mode
// <
o1.1
> DBG_STOP <
i
> Debug Stop Mode
// <
o1.2
> DBG_STANDBY <
i
> Debug Standby Mode
// <
o1.5
> TRACE_IOEN <
i
> Trace I/O Enable
// <
o1.6..7
> TRACE_MODE <
i
> Trace Mode
// <
0
=> Asynchronous
// <
1
=> Synchronous: TRACEDATA Size 1
// <
2
=> Synchronous: TRACEDATA Size 2
// <
3
=> Synchronous: TRACEDATA Size 4
// </
h
>
_WDWORD(0xE0042004, 0x000000E7); // DBGMCU_CR
// <
h
> Debug MCU APB1 Freeze
// <
o1.0
> DBG_TIM2_STOP <
i
> Timer 2 Stopped when Core is halted
// <
o1.1
> DBG_TIM3_STOP <
i
> Timer 3 Stopped when Core is halted
// <
o1.2
> DBG_TIM4_STOP <
i
> Timer 4 Stopped when Core is halted
// <
o1.3
> DBG_TIM5_STOP <
i
> Timer 5 Stopped when Core is halted
// <
o1.4
> DBG_TIM6_STOP <
i
> Timer 6 Stopped when Core is halted
// <
o1.5
> DBG_TIM7_STOP <
i
> Timer 7 Stopped when Core is halted
// <
o1.6
> DBG_TIM12_STOP <
i
> Timer 12 Stopped when Core is halted
// <
o1.7
> DBG_TIM13_STOP <
i
> Timer 13 Stopped when Core is halted
// <
o1.8
> DBG_TIM14_STOP <
i
> Timer 14 Stopped when Core is halted
// <
o1.10
> DBG_RTC_STOP <
i
> RTC Stopped when Core is halted
// <
o1.11
> DBG_WWDG_STOP <
i
> Window Watchdog Stopped when Core is halted
// <
o1.12
> DBG_IWDG_STOP <
i
> Independent Watchdog Stopped when Core is halted
// <
o1.21
> DBG_I2C1_SMBUS_TIMEOUT <
i
> I2C1 SMBUS Timeout Mode Stopped when Core is halted
// <
o1.22
> DBG_I2C2_SMBUS_TIMEOUT <
i
> I2C2 SMBUS Timeout Mode Stopped when Core is halted
// <
o1.23
> DBG_I2C3_SMBUS_TIMEOUT <
i
> I2C3 SMBUS Timeout Mode Stopped when Core is halted
// <
o1.25
> DBG_CAN1_STOP <
i
> CAN1 Stopped when Core is halted
// <
o1.26
> DBG_CAN2_STOP <
i
> CAN2 Stopped when Core is halted
// </
h
>
_WDWORD(0xE0042008, 0x00000000); // DBGMCU_APB1_FZ
// <
h
> Debug MCU APB2 Freeze
// <
o1.0
> DBG_TIM1_STOP <
i
> Timer 1 Stopped when Core is halted
// <
o1.1
> DBG_TIM8_STOP <
i
> Timer 8 Stopped when Core is halted
// <
o1.16
> DBG_TIM9_STOP <
i
> Timer 9 Stopped when Core is halted
// <
o1.17
> DBG_TIM10_STOP <
i
> Timer 10 Stopped when Core is halted
// <
o1.18
> DBG_TIM11_STOP <
i
> Timer 11 Stopped when Core is halted
// </
h
>
_WDWORD(0xE004200C, 0x00000000); // DBGMCU_APB2_FZ
}
// Executed after reset via uVision's 'Reset'-button
FUNC void OnResetExec (void) {
DebugSetup();
}
DebugSetup(); // Debugger Setup
2014-10-23 10:20 AM
Has anyone else experienced any issues with the ETM trace with this part or the eval board?
I've tinkered with it on anhttp://www.keil.com/mcbstm32f400/
board using Keil Uv4.x, I haven't played with it on the STM324x9I-EVAL2014-10-23 10:45 AM
2014-10-23 11:40 AM
do ST monitor them or should I try contacting them directly?
Well to some degree, but it's a user forum, and you'd be better pushing for support through classic FAE and rep channels. The Keil board required I jumper off a bunch of the address lines to the Trace port, but it did appear to be functional.2014-10-24 06:22 AM
I was able to get the ETM to work in 1 & 2-bit mode. I'm sure its got something to do with the memory address pins. I don't have the FMC configured at all as I can tell, however sharing the trace pins with the address pins is not going to work for my application anyway. Thanks for help.