1.Full SWJ Disabled (JTAG-DP + SW-DP)

2.Change SWDIO and SWCLK pin to 13 and 14
pull/1/head
unknown 3 years ago
parent a3c1aa9f74
commit b098cf993b
  1. 4
      CMSIS-DAP2mod/STM32/CMSIS-DAP.c
  2. 4
      CMSIS-DAP2mod/STM32/DAP_config.h

@ -413,8 +413,8 @@ void BoardInit(void)
// Enable GPIOA-GPIOC // Enable GPIOA-GPIOC
RCC->APB2ENR |= (RCC_APB2ENR_AFIOEN | RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN | RCC_APB2ENR_IOPCEN); RCC->APB2ENR |= (RCC_APB2ENR_AFIOEN | RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN | RCC_APB2ENR_IOPCEN);
// Enable SWJ only // Full SWJ Disabled (JTAG-DP + SW-DP)
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE); GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);
GPIO_INIT(GPIOA, INIT_PINS_A); GPIO_INIT(GPIOA, INIT_PINS_A);
GPIO_INIT(GPIOB, INIT_PINS_B); GPIO_INIT(GPIOB, INIT_PINS_B);

@ -256,11 +256,11 @@ typedef enum Pin_e {
// SWDIO/TMS Pin // SWDIO/TMS Pin
#define PIN_SWDIO_TMS_PORT GPIOA #define PIN_SWDIO_TMS_PORT GPIOA
#define PIN_SWDIO_TMS_PIN 2 #define PIN_SWDIO_TMS_PIN 13
// SWCLK/TCK Pin // SWCLK/TCK Pin
#define PIN_SWCLK_TCK_PORT GPIOA #define PIN_SWCLK_TCK_PORT GPIOA
#define PIN_SWCLK_TCK_PIN 4 #define PIN_SWCLK_TCK_PIN 14
// TDO/SWO Pin (input) // TDO/SWO Pin (input)
#define PIN_TDO_PORT GPIOA #define PIN_TDO_PORT GPIOA

Loading…
Cancel
Save