Don't enable usb uart on v2 when debugging
This commit is contained in:
parent
5e8794627a
commit
7730d3b198
|
@ -164,7 +164,12 @@ void platform_init(void)
|
||||||
|
|
||||||
platform_timing_init();
|
platform_timing_init();
|
||||||
cdcacm_init();
|
cdcacm_init();
|
||||||
|
|
||||||
|
/* On mini hardware, UART and SWD share connector pins.
|
||||||
|
* Don't enable UART if we're being debugged. */
|
||||||
|
if ((platform_hwversion() == 0) || !(SCS_DEMCR & SCS_DEMCR_TRCENA))
|
||||||
usbuart_init();
|
usbuart_init();
|
||||||
|
|
||||||
setup_vbus_irq();
|
setup_vbus_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,4 +352,3 @@ asm(".globl debug_monitor_handler\n"
|
||||||
" b debug_monitor_handler_c\n");
|
" b debug_monitor_handler_c\n");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -46,13 +46,6 @@ static void usbuart_run(void);
|
||||||
|
|
||||||
void usbuart_init(void)
|
void usbuart_init(void)
|
||||||
{
|
{
|
||||||
#if defined(BLACKMAGIC)
|
|
||||||
/* On mini hardware, UART and SWD share connector pins.
|
|
||||||
* Don't enable UART if we're being debugged. */
|
|
||||||
if ((platform_hwversion() == 1) && (SCS_DEMCR & SCS_DEMCR_TRCENA))
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rcc_periph_clock_enable(USBUSART_CLK);
|
rcc_periph_clock_enable(USBUSART_CLK);
|
||||||
|
|
||||||
UART_PIN_SETUP();
|
UART_PIN_SETUP();
|
||||||
|
@ -257,4 +250,3 @@ void USBUSART_TIM_ISR(void)
|
||||||
/* process FIFO */
|
/* process FIFO */
|
||||||
usbuart_run();
|
usbuart_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue