STM32F2xx_TP.ini 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /******************************************************************************/
  2. /* STM32F2xx_TP.ini: STM32F2xx Debugger Initialization File */
  3. /******************************************************************************/
  4. // <<< Use Configuration Wizard in Context Menu >>> //
  5. /******************************************************************************/
  6. /* This file is part of the uVision/ARM development tools. */
  7. /* Copyright (c) 2010 Keil Software. All rights reserved. */
  8. /* This software may only be used under the terms of a valid, current, */
  9. /* end user licence from KEIL for a compatible version of KEIL software */
  10. /* development tools. Nothing else gives you the right to use this software. */
  11. /******************************************************************************/
  12. FUNC void DebugSetup (void) {
  13. // <h> Debug MCU Configuration
  14. // <o12.0> DBG_SLEEP <i> Debug Sleep Mode
  15. // <o12.1> DBG_STOP <i> Debug Stop Mode
  16. // <o12.2> DBG_STANDBY <i> Debug Standby Mode
  17. // <o12.5> TRACE_IOEN <i> Trace I/O Enable
  18. // <o12.6..7> TRACE_MODE <i> Trace Mode
  19. // <0=> Asynchronous
  20. // <1=> Synchronous: TRACEDATA Size 1
  21. // <2=> Synchronous: TRACEDATA Size 2
  22. // <3=> Synchronous: TRACEDATA Size 4
  23. // </h>
  24. _WDWORD(0x40023830, _RDWORD(0x40023830) | 0x00000010); // RCC_AHB1ENR: IO port E clock enable
  25. _WDWORD(0x40021000, 0x00002AA0); // GPIOE_MODER: PE2..PE6 = Alternate function mode
  26. _WDWORD(0x40021008, 0x00001550); // GPIOx_OSPEEDR: PE2..PE6 = 25 MHz Medium speed
  27. _WDWORD(0x4002100C, 0x00001550); // GPIOx_PUPDR: PE2..PE6 = Pull-up
  28. _WDWORD(0x40021020, 0x00000000); // GPIOx_AFRL: PE2..PE6 = AF0
  29. _WDWORD(0xE0042004, 0x000000E7); // Set DBGMCU_CR
  30. }
  31. DebugSetup(); // Debugger Setup