From d6f8a343a2a6b7a728a39ccb1f57561ca165cbd6 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Wed, 10 Aug 2022 06:16:44 +0100 Subject: [PATCH] platform: Fixed the order of operations with the physical UART init vs the USB stack init --- src/platforms/96b_carbon/platform.c | 2 +- src/platforms/blackpillv2/platform.c | 2 +- src/platforms/f4discovery/platform.c | 2 +- src/platforms/hydrabus/platform.c | 2 +- src/platforms/launchpad-icdi/platform.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platforms/96b_carbon/platform.c b/src/platforms/96b_carbon/platform.c index ac6ad61..5884163 100644 --- a/src/platforms/96b_carbon/platform.c +++ b/src/platforms/96b_carbon/platform.c @@ -68,8 +68,8 @@ void platform_init(void) gpio_mode_setup(LED_PORT_ERROR, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, LED_ERROR); platform_timing_init(); - usbuart_init(); blackmagic_usb_init(); + usbuart_init(); } void platform_nrst_set_val(bool assert) diff --git a/src/platforms/blackpillv2/platform.c b/src/platforms/blackpillv2/platform.c index 5cd2372..a1e13de 100644 --- a/src/platforms/blackpillv2/platform.c +++ b/src/platforms/blackpillv2/platform.c @@ -107,8 +107,8 @@ void platform_init(void) #endif platform_timing_init(); - usbuart_init(); blackmagic_usb_init(); + usbuart_init(); // https://github.com/libopencm3/libopencm3/pull/1256#issuecomment-779424001 OTG_FS_GCCFG |= OTG_GCCFG_NOVBUSSENS | OTG_GCCFG_PWRDWN; diff --git a/src/platforms/f4discovery/platform.c b/src/platforms/f4discovery/platform.c index 66c9087..b5d88bf 100644 --- a/src/platforms/f4discovery/platform.c +++ b/src/platforms/f4discovery/platform.c @@ -106,8 +106,8 @@ void platform_init(void) #endif platform_timing_init(); - usbuart_init(); blackmagic_usb_init(); + usbuart_init(); } void platform_nrst_set_val(bool assert) { (void)assert; } diff --git a/src/platforms/hydrabus/platform.c b/src/platforms/hydrabus/platform.c index b2fa6b5..c4413f5 100644 --- a/src/platforms/hydrabus/platform.c +++ b/src/platforms/hydrabus/platform.c @@ -76,8 +76,8 @@ void platform_init(void) LED_UART | LED_IDLE_RUN | LED_ERROR | LED_BOOTLOADER); platform_timing_init(); - usbuart_init(); blackmagic_usb_init(); + usbuart_init(); } void platform_nrst_set_val(bool assert) { (void)assert; } diff --git a/src/platforms/launchpad-icdi/platform.c b/src/platforms/launchpad-icdi/platform.c index 96e4c9a..0bda7b1 100644 --- a/src/platforms/launchpad-icdi/platform.c +++ b/src/platforms/launchpad-icdi/platform.c @@ -80,8 +80,8 @@ void platform_init(void) periph_clock_enable(RCC_GPIOD); __asm__("nop"); __asm__("nop"); __asm__("nop"); gpio_mode_setup(GPIOD_BASE, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO4|GPIO5); - usbuart_init(); blackmagic_usb_init(); + usbuart_init(); usb_enable_interrupts(USB_INT_RESET | USB_INT_DISCON | USB_INT_RESUME | USB_INT_SUSPEND, 0xff, 0xff);