diff --git a/projects/rfdsatt/rfdsatt.c b/projects/rfdsatt/rfdsatt.c index 39c4a24..2689fae 100644 --- a/projects/rfdsatt/rfdsatt.c +++ b/projects/rfdsatt/rfdsatt.c @@ -143,7 +143,11 @@ static void usart_setup(void) static void gpio_setup(void) { #ifdef STM32F1 - /* Set GPIO15 (in GPIO port B) to 'output push-pull'. */ + /* disable JTAG, keep SWJ-DP (we use some related GPIOs) */ + rcc_periph_clock_enable(RCC_AFIO); + gpio_primary_remap(AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_ON, 0); + + /* Set GPIO15 (in GPIO port B) to 'output push-pull' for the LED. */ gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO15); #else