diff options
| author | kkitayam <[email protected]> | 2021-10-30 23:41:23 +0900 |
|---|---|---|
| committer | kkitayam <[email protected]> | 2021-11-06 00:06:26 +0900 |
| commit | 50ca0dda2ca4fe32f681f2955c9ec39355e3082e (patch) | |
| tree | 84a1f127d9d0e2f7974583cd313d7bc2b5848459 /hw | |
| parent | f183d0810bb4570bf569cb08a6644933b8813dff (diff) | |
Add dcd_musb.c
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/msp432e4/family.c | 2 | ||||
| -rw-r--r-- | hw/bsp/msp432e4/family.mk | 17 |
2 files changed, 9 insertions, 10 deletions
diff --git a/hw/bsp/msp432e4/family.c b/hw/bsp/msp432e4/family.c index 3bb36042d..567d5dc93 100644 --- a/hw/bsp/msp432e4/family.c +++ b/hw/bsp/msp432e4/family.c @@ -122,6 +122,8 @@ void board_init(void) for (int i = 0; i < 16; ++i) __NOP(); SYSCTL->SRUSB = 0u; + USB0->CC = USB_CC_CLKEN | (3u << USB_CC_CLKDIV_S); /* 60MHz = 240MHz / 4 */ + __DMB(); /* Wait for completion of opening of the clock gate */ } //--------------------------------------------------------------------+ diff --git a/hw/bsp/msp432e4/family.mk b/hw/bsp/msp432e4/family.mk index d0ea13456..aad5c77e8 100644 --- a/hw/bsp/msp432e4/family.mk +++ b/hw/bsp/msp432e4/family.mk @@ -11,6 +11,9 @@ CFLAGS += \ -D__MSP432E401Y__ \ -DCFG_TUSB_MCU=OPT_MCU_MSP432E4xx +# mcu driver cause following warnings +CFLAGS += -Wno-error=cast-qual -Wno-error=format= + # All source paths should be relative to the top level. LD_FILE = hw/mcu/ti/msp432e4/Source/msp432e401y.ld LDINC += $(TOP)/hw/mcu/ti/msp432e4/Include @@ -19,7 +22,7 @@ LDFLAGS += $(addprefix -L,$(LDINC)) MCU_DIR = hw/mcu/ti/msp432e4 SRC_C += \ - src/portable/mentor/dcd_musb.c \ + src/portable/mentor/musb/dcd_musb.c \ $(MCU_DIR)/Source/system_msp432e401y.c INC += \ @@ -37,12 +40,6 @@ ifneq ($(OS),Windows_NT) export LD_LIBRARY_PATH=$(dir $(shell which MSP430Flasher)) endif -# flash target using TI MSP430-Flasher -# http://www.ti.com/tool/MSP430-FLASHER -# Please add its installation dir to PATH -flash: $(BUILD)/$(PROJECT).hex - MSP430Flasher -w $< -z [VCC] - -# flash target using mspdebug. -flash-mspdebug: $(BUILD)/$(PROJECT).elf - $(MSPDEBUG) tilib "prog $<" --allow-fw-update +# For flash-jlink target +JLINK_DEVICE = MSP432E401Y +JLINK_IF = SWD |
