platform: Fixed the order of operations with the physical UART init vs the USB stack init

This commit is contained in:
dragonmux 2022-08-10 06:16:44 +01:00 committed by Piotr Esden-Tempski
parent 82bca86806
commit d6f8a343a2
5 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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

View File

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