rfdsatt: Disalbe JTAG AF on some GPIO lines overlapping LE
This commit is contained in:
parent
f025e64a57
commit
26b10f3e5d
|
@ -143,7 +143,11 @@ static void usart_setup(void)
|
||||||
static void gpio_setup(void)
|
static void gpio_setup(void)
|
||||||
{
|
{
|
||||||
#ifdef STM32F1
|
#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_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
|
||||||
GPIO_CNF_OUTPUT_PUSHPULL, GPIO15);
|
GPIO_CNF_OUTPUT_PUSHPULL, GPIO15);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue