Move clock enable to BSP.
@@ -84,7 +84,6 @@ void board_init(void)
usart_async_init(&edbg_com, USART1, edbg_com_buffer, sizeof(edbg_com_buffer), _usart_get_usart_async());
usart_async_set_baud_rate(&edbg_com, CFG_BOARD_UART_BAUDRATE);
usart_async_register_callback(&edbg_com, USART_ASYNC_TXC_CB, tx_cb_EDBG_COM);
-// usart_async_register_callback(&EDBG_COM, USART_ASYNC_RXC_CB, rx_cb_EDBG_COM);
usart_async_enable(&edbg_com);
#if CFG_TUSB_OS == OPT_OS_NONE
@@ -92,18 +91,9 @@ void board_init(void)
SysTick_Config(CONF_CPU_FREQUENCY / 1000);
#endif
-#if 0
- // USB Pin, Clock init
+ // Enable USB clock
+ _pmc_enable_periph_clock(ID_USBHS);
- /* Clear SYSIO 10 & 11 for USB DM & DP */
- hri_matrix_clear_CCFG_SYSIO_reg(MATRIX, CCFG_SYSIO_SYSIO10 | CCFG_SYSIO_SYSIO11);
-
- // Enable clock
- _pmc_enable_periph_clock(ID_UDP);
-
- /* USB Device mode & Transceiver active */
- hri_matrix_write_CCFG_USBMR_reg(MATRIX, CCFG_USBMR_USBMODE);
-#endif
}
//--------------------------------------------------------------------+
