rt-thread-official/bsp/stm32f20x/STM32F2xx_TP.ini

37 lines
2.0 KiB
INI

/******************************************************************************/
/* STM32F2xx_TP.ini: STM32F2xx Debugger Initialization File */
/******************************************************************************/
// <<< Use Configuration Wizard in Context Menu >>> //
/******************************************************************************/
/* This file is part of the uVision/ARM development tools. */
/* Copyright (c) 2010 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) {
// <h> Debug MCU Configuration
// <o12.0> DBG_SLEEP <i> Debug Sleep Mode
// <o12.1> DBG_STOP <i> Debug Stop Mode
// <o12.2> DBG_STANDBY <i> Debug Standby Mode
// <o12.5> TRACE_IOEN <i> Trace I/O Enable
// <o12.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(0x40023830, _RDWORD(0x40023830) | 0x00000010); // RCC_AHB1ENR: IO port E clock enable
_WDWORD(0x40021000, 0x00002AA0); // GPIOE_MODER: PE2..PE6 = Alternate function mode
_WDWORD(0x40021008, 0x00001550); // GPIOx_OSPEEDR: PE2..PE6 = 25 MHz Medium speed
_WDWORD(0x4002100C, 0x00001550); // GPIOx_PUPDR: PE2..PE6 = Pull-up
_WDWORD(0x40021020, 0x00000000); // GPIOx_AFRL: PE2..PE6 = AF0
_WDWORD(0xE0042004, 0x000000E7); // Set DBGMCU_CR
}
DebugSetup(); // Debugger Setup