Hello,
I am busy on a new project with a STM32F207. On our last projects we used STM32F10x-Devices and for debugging purposes I used the corresponding debug.ini file.
/******************************************************************************/ /* Dbg_STM32F2xx.ini: STM32F2xx Debugger Initialization File */ /******************************************************************************/ /* This file is part of the uVision/ARM development tools. */ /* Copyright (c) 2005-2013 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. */ /******************************************************************************/ _WDWORD(0xE0042004, 0x00000027); // Set DBGMCU_CR
The old ini file was much more verbose and meaningful. And the content of the DBGMCU_CR register is not compatible between F1 and F2 devices.
Do I have to setup the freeze registers BGMCU_APB1_FZ and DBGMCU_APB2_FZ)? Can this be done here in the ini file?
Is there any example ini file available where I can choose the peripherals (timer, can, etc.) which should stop when core is halted?
Thank you Leo
I modified Dbg_STM32F2xx.ini in a way that uVision configuration wizzard will be activated. I hope this will work and all configuration bits are adressed and set correctly.
/******************************************************************************/ /* Dbg_STM32F2xx.ini: STM32F2xx Debugger Initialization File */ /******************************************************************************/ // <<< Use Configuration Wizard in Context Menu >>> // /******************************************************************************/ /* This file is part of the uVision/ARM development tools. */ /* Copyright (c) 2005-2013 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. */ /******************************************************************************/ /* Modified 11/2015 by L. Fuchs, WMF Group GmbH */ /* added: setup DBGMCU_APB1_FZ and DBGMCU_APB2_FZ */ /******************************************************************************/ FUNC void DebugSetup (void) { // <h> Debug MCU Configuration // <o1.0> DBG_SLEEP Debug Sleep Mode // <o1.1> DBG_STOP Debug Stop Mode // <o1.2> DBG_STANDBY Debug Standby Mode // <o1.5> TRACE_IOEN Trace I/O Enable // <o1.6..7> TRACE_MODE Trace Mode // <0=> Asynchronous // <1=> Synchronous: TRACEDATA Size 1 // <2=> Synchronous: TRACEDATA Size 2 // <3=> Synchronous: TRACEDATA Size 4 // </h> _WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR // <h> Debug MCU APB1 freeze register // <o1.0> DBG_TIM2_STOP TIM2 counter stopped when core is halted // <o1.1> DBG_TIM3_STOP TIM3 counter stopped when core is halted // <o1.2> DBG_TIM4_STOP TIM4 counter stopped when core is halted // <o1.3> DBG_TIM5_STOP TIM5 counter stopped when core is halted // <o1.4> DBG_TIM6_STOP TIM6 counter stopped when core is halted // <o1.5> DBG_TIM7_STOP TIM7 counter stopped when core is halted // <o1.6> DBG_TIM12_STOP TIM12 counter stopped when core is halted // <o1.7> DBG_TIM13_STOP TIM13 counter stopped when core is halted // <o1.8> DBG_TIM14_STOP TIMx14counter stopped when core is halted // <o1.10> DBG_RTC_STOP RTC stopped when Core is halted // <o1.11> DBG_WWDG_STOP Debug Window Watchdog stopped when Core is halted // <o1.12> DBG_IWDG_STOP Debug independent watchdog stopped when core is halted // <o1.21> DBG_I2C1_SMBUS_TIMEOUT SMBUS timeout mode stopped when Core is halted // <o1.22> DBG_I2C2_SMBUS_TIMEOUT SMBUS timeout mode stopped when Core is halted // <o1.23> DBG_I2C3_SMBUS_TIMEOUT DBG_I2C3_SMBUS_TIMEOUT // <o1.25> DBG_CAN1_STOP Debug CAN2 stopped when Core is halted // <o1.26> DBG_CAN2_STOP Debug CAN2 stopped when Core is halted // </h> _WDWORD(0xE0042008, 0x00001DFF); // DBGMCU_APB1_FZ // <h> Debug MCU APB2 Freeze register // <o1.0> DBG_TIM1_STOP TIM1 counter stopped when core is halted // <o1.1> DBG_TIM8_STOP TIM8 counter stopped when core is halted // <o1.16> DBG_TIM9_STOP TIM9 counter stopped when core is halted // <o1.17> DBG_TIM10_STOP TIM10 counter stopped when core is halted // <o1.18> DBG_TIM11_STOP TIM11 counter stopped when core is halted // </h> _WDWORD(0xE004200C, 0x00070003); // DBGMCU_APB2_FZ } DebugSetup(); // Debugger Setup