Skip to content

Commit

Permalink
SKR Mini: Disable SWD for version 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Arksine committed May 23, 2020
1 parent 293b5c2 commit 34587ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bootloader/F1/Inc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
#define DISC_HIGH WRITE_REG(GPIOC->BSRR, GPIO_BSRR_BS13)
#define DISC_LOW WRITE_REG(GPIOC->BRR, GPIO_BRR_BR13)

#define DISABLE_JTAG
#define DISABLE_DEBUG AFIO_MAPR_SWJ_CFG_JTAGDISABLE
#define AFIO_CLOCK RCC_APB2ENR_AFIOEN

#ifdef ENABLE_BUTTON
Expand Down Expand Up @@ -186,7 +186,7 @@
#define DISC_HIGH WRITE_REG(GPIOA->BSRR, GPIO_BSRR_BS14)
#define DISC_LOW WRITE_REG(GPIOA->BRR, GPIO_BRR_BR14)

#define DISABLE_JTAG
#define DISABLE_DEBUG AFIO_MAPR_SWJ_CFG_DISABLE
#define AFIO_CLOCK RCC_APB2ENR_AFIOEN

#ifdef ENABLE_BUTTON
Expand Down
4 changes: 2 additions & 2 deletions bootloader/F1/Src/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ void pins_init(void)
SET_BIT(RCC->APB2ENR,
LED1_CLOCK | LED2_CLOCK | DISC_CLOCK | BOOT_CLOCK | AFIO_CLOCK);

#if defined DISABLE_JTAG
#if defined DISABLE_DEBUG
RCC->APB2ENR;
AFIO->MAPR = AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
AFIO->MAPR = DISABLE_DEBUG;
#endif

LED1_BIT_0;
Expand Down

0 comments on commit 34587ef

Please sign in to comment.