usb hw init OK

This commit is contained in:
hathach
2019-11-24 23:46:28 +07:00
parent 24b2cea139
commit 58e8265964
4 changed files with 128 additions and 3 deletions
+8
View File
@@ -73,6 +73,14 @@ void board_init(void)
// Enble clock
_pmc_enable_periph_clock(ID_UDP);
/* USB Device mode & Transceiver active */
hri_matrix_write_CCFG_USBMR_reg(MATRIX, CCFG_USBMR_USBMODE);
// NVIC_EnableIRQ(UDP_IRQn);
// Attach
hri_udp_write_TXVC_reg(UDP, UDP_TXVC_PUON);
}
//--------------------------------------------------------------------+