]> begriffs open source - cmsis-driver-validation/blob - Boards/Keil/MCBSTM32F400/STM32_SWO.ini
Update GitHub Actions runner to ubuntu-22.04 (#18)
[cmsis-driver-validation] / Boards / Keil / MCBSTM32F400 / STM32_SWO.ini
1 /******************************************************************************/
2 /* STM32F2xx_SWO.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) 2005-2013 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
13
14 FUNC void DebugSetup (void) {
15
16 // <h> Debug MCU Configuration
17 //   <o12.0>    DBG_SLEEP     <i> Debug Sleep Mode
18 //   <o12.1>    DBG_STOP      <i> Debug Stop Mode
19 //   <o12.2>    DBG_STANDBY   <i> Debug Standby Mode
20 //   <o12.5>    TRACE_IOEN    <i> Trace I/O Enable 
21 //   <o12.6..7> TRACE_MODE    <i> Trace Mode
22 //             <0=> Asynchronous
23 //             <1=> Synchronous: TRACEDATA Size 1
24 //             <2=> Synchronous: TRACEDATA Size 2
25 //             <3=> Synchronous: TRACEDATA Size 4
26 // </h>
27
28  _WDWORD(0x40023830, _RDWORD(0x40023830) | 0x00000010); // RCC_AHB1ENR:   IO port E clock enable
29  _WDWORD(0x40021000, 0x00002AA0);                       // GPIOE_MODER:   PE2..PE6 = Alternate function mode
30  _WDWORD(0x40021008, 0x00001550);                       // GPIOx_OSPEEDR: PE2..PE6 = 25 MHz Medium speed
31  _WDWORD(0x4002100C, 0x00001550);                       // GPIOx_PUPDR:   PE2..PE6 = Pull-up
32  _WDWORD(0x40021020, 0x00000000);                       // GPIOx_AFRL:    PE2..PE6 = AF0
33
34  _WDWORD(0xE0042004, 0x00000027);                       // Set DBGMCU_CR
35
36 }
37
38 DebugSetup();                                           // Debugger Setup