rfdsatt: Disalbe JTAG AF on some GPIO lines overlapping LE

This commit is contained in:
Harald Welte 2021-04-13 18:42:14 +02:00
parent f025e64a57
commit 26b10f3e5d
1 changed files with 5 additions and 1 deletions

View File

@ -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