mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
Added support for the NXP K64 series
This commit is contained in:
parent
8fa0b74d80
commit
e2f28bc134
@ -47,7 +47,7 @@
|
||||
#elif TU_CHECK_MCU(OPT_MCU_LPC51UXX, OPT_MCU_LPC54XXX, OPT_MCU_LPC55XX, OPT_MCU_MCXN9)
|
||||
#include "fsl_device_registers.h"
|
||||
|
||||
#elif TU_CHECK_MCU(OPT_MCU_KINETIS_KL, OPT_MCU_KINETIS_K32L)
|
||||
#elif TU_CHECK_MCU(OPT_MCU_KINETIS_KL, OPT_MCU_KINETIS_K32L, OPT_MCU_KINETIS_K64)
|
||||
#include "fsl_device_registers.h"
|
||||
|
||||
#elif CFG_TUSB_MCU == OPT_MCU_NRF5X
|
||||
|
@ -97,7 +97,7 @@
|
||||
#define TUP_DCD_ENDPOINT_MAX 8
|
||||
#define TUP_RHPORT_HIGHSPEED 1
|
||||
|
||||
#elif TU_CHECK_MCU(OPT_MCU_KINETIS_KL, OPT_MCU_KINETIS_K32L)
|
||||
#elif TU_CHECK_MCU(OPT_MCU_KINETIS_KL, OPT_MCU_KINETIS_K32L, OPT_MCU_KINETIS_K64)
|
||||
#define TUP_USBIP_CHIPIDEA_FS
|
||||
#define TUP_USBIP_CHIPIDEA_FS_KINETIS
|
||||
#define TUP_DCD_ENDPOINT_MAX 16
|
||||
|
@ -269,9 +269,23 @@ void dcd_init(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
|
||||
#if (CFG_TUSB_MCU == OPT_MCU_KINETIS_K64)
|
||||
uint32_t clk_recover_irc_en;
|
||||
uint32_t clk_recover_ctrl;
|
||||
|
||||
clk_recover_irc_en = KHCI->CLK_RECOVER_IRC_EN;
|
||||
clk_recover_ctrl = KHCI->CLK_RECOVER_CTRL;
|
||||
|
||||
KHCI->USBTRC0 |= USB_USBTRC0_USBRESET_MASK;
|
||||
while (KHCI->USBTRC0 & USB_USBTRC0_USBRESET_MASK);
|
||||
|
||||
KHCI->CLK_RECOVER_IRC_EN = clk_recover_irc_en;
|
||||
KHCI->CLK_RECOVER_CTRL |= clk_recover_ctrl;
|
||||
#else
|
||||
KHCI->USBTRC0 |= USB_USBTRC0_USBRESET_MASK;
|
||||
while (KHCI->USBTRC0 & USB_USBTRC0_USBRESET_MASK);
|
||||
#endif
|
||||
|
||||
tu_memclr(&_dcd, sizeof(_dcd));
|
||||
KHCI->USBTRC0 |= TU_BIT(6); /* software must set this bit to 1 */
|
||||
KHCI->BDTPAGE1 = (uint8_t)((uintptr_t)_dcd.bdt >> 8);
|
||||
|
@ -121,6 +121,7 @@
|
||||
#define OPT_MCU_KINETIS_KL 1200 ///< NXP KL series
|
||||
#define OPT_MCU_KINETIS_K32L 1201 ///< NXP K32L series
|
||||
#define OPT_MCU_KINETIS_K32 1201 ///< Alias to K32L
|
||||
#define OPT_MCU_KINETIS_K64 1202 ///< NXP K64 series
|
||||
|
||||
#define OPT_MCU_MKL25ZXX 1200 ///< Alias to KL (obsolete)
|
||||
#define OPT_MCU_K32L2BXX 1201 ///< Alias to K32 (obsolete)
|
||||
|
Loading…
x
Reference in New Issue
Block a user