adding lpc1549, but couldnt recieve setup packet, though setup received interrupt is triggered
This commit is contained in:
@@ -58,8 +58,6 @@ static const PINMUX_GRP_T pinmuxing[] =
|
||||
{0, 19, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGMODE_EN)}, // UART0 TX
|
||||
};
|
||||
|
||||
|
||||
#if 1
|
||||
/* Setup system clocking */
|
||||
static void SystemSetupClocking(void)
|
||||
{
|
||||
@@ -114,13 +112,11 @@ static void SystemSetupClocking(void)
|
||||
/* Wait for PLL to lock */
|
||||
while (!Chip_Clock_IsUSBPLLLocked()) {}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Invoked by startup code
|
||||
void SystemInit(void)
|
||||
{
|
||||
SystemSetupClocking();
|
||||
// Chip_SystemInit();
|
||||
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_RAM1);
|
||||
|
||||
/* Enable IOCON clock */
|
||||
|
||||
@@ -7,7 +7,7 @@ CFLAGS += \
|
||||
-D__USE_LPCOPEN \
|
||||
-DCFG_EXAMPLE_MSC_READONLY \
|
||||
-DCFG_TUSB_MCU=OPT_MCU_LPC13XX \
|
||||
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM3")))' \
|
||||
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \
|
||||
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
|
||||
|
||||
# startup.c and lpc_types.h cause following errors
|
||||
|
||||
@@ -5,13 +5,11 @@ CFLAGS += \
|
||||
-nostdlib \
|
||||
-DCORE_M3 \
|
||||
-D__USE_LPCOPEN \
|
||||
-DCFG_EXAMPLE_MSC_READONLY \
|
||||
-DCFG_TUSB_MCU=OPT_MCU_LPC15XX \
|
||||
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
|
||||
|
||||
# -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM3")))' \
|
||||
# -DCFG_EXAMPLE_MSC_READONLY \
|
||||
|
||||
# startup.c and lpc_types.h cause following errors
|
||||
# mcu driver cause following warnings
|
||||
CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=unused-variable
|
||||
|
||||
MCU_DIR = hw/mcu/nxp/lpc_driver/lpc15xx/lpc_chip_15xx
|
||||
|
||||
@@ -40,24 +40,21 @@ const uint32_t RTCOscRateIn = 32768;
|
||||
|
||||
/* Pin muxing table, only items that need changing from their default pin
|
||||
state are in this table. */
|
||||
static const PINMUX_GRP_T pinmuxing[] =
|
||||
static const PINMUX_GRP_T pinmuxing[] =
|
||||
{
|
||||
{1, 11, (IOCON_MODE_PULLDOWN | IOCON_DIGMODE_EN)}, /* PIO0_3 used for USB_VBUS */
|
||||
{1, 11, (IOCON_MODE_PULLDOWN | IOCON_DIGMODE_EN)}, /* PIO1_11-ISP_1 (VBUS) */
|
||||
};
|
||||
|
||||
// Invoked by startup code
|
||||
void SystemInit(void)
|
||||
{
|
||||
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_IOCON);
|
||||
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM);
|
||||
Chip_SYSCTL_PeriphReset(RESET_IOCON);
|
||||
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM);
|
||||
Chip_SYSCTL_PeriphReset(RESET_IOCON);
|
||||
|
||||
// Pin Mux
|
||||
// Pin Mux
|
||||
Chip_IOCON_SetPinMuxing(LPC_IOCON, pinmuxing, sizeof(pinmuxing) / sizeof(PINMUX_GRP_T));
|
||||
|
||||
// SWM USB
|
||||
Chip_SWM_MovablePortPinAssign(SWM_USB_VBUS_I, 1, 11);
|
||||
|
||||
Chip_SetupXtalClocking();
|
||||
}
|
||||
|
||||
@@ -82,6 +79,7 @@ void board_init(void)
|
||||
Chip_GPIO_SetPinDIRInput(LPC_GPIO, BUTTON_PORT, BUTTON_PIN);
|
||||
|
||||
// USB: Setup PLL clock, and power
|
||||
Chip_SWM_MovablePortPinAssign(SWM_USB_VBUS_I, 1, 11);
|
||||
Chip_USB_Init();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user