busvoodoo_global: disable SWJ for dongle
This commit is contained in:
parent
4ca7fa65ec
commit
db98878e63
|
@ -91,6 +91,13 @@ void busvoodoo_setup(void)
|
|||
rcc_periph_clock_enable(RCC_GPIOC); // enable clock for all GPIO domains
|
||||
rcc_periph_clock_enable(RCC_GPIOD); // enable clock for all GPIO domains
|
||||
rcc_periph_clock_enable(RCC_AFIO); // enable clock for alternate function (for communication)
|
||||
#if BUSVOODOO_HARDWARE_VERSION == 2
|
||||
#if DEBUG
|
||||
gpio_primary_remap(AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_ON, 0); // disable JTAG to get PA15 as GPIO
|
||||
#else
|
||||
gpio_primary_remap(AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_OFF, 0); // disable JTAG to get PA15 as GPIO, and SWD to not interfere
|
||||
#endif
|
||||
#endif
|
||||
busvoodoo_safe_state(); // put pins in safe state (for common light version)
|
||||
|
||||
#if BUSVOODOO_HARDWARE_VERSION != 2
|
||||
|
|
Loading…
Reference in New Issue