diff --git a/demos/device/device_os_none/.cproject b/demos/device/device_os_none/.cproject
index 4b6066b5..65ba9500 100644
--- a/demos/device/device_os_none/.cproject
+++ b/demos/device/device_os_none/.cproject
@@ -30,7 +30,7 @@
-
+
-
+
@@ -62,7 +62,7 @@
-
+
@@ -120,7 +120,7 @@
-
+
-
+
@@ -152,7 +152,7 @@
-
+
@@ -209,7 +209,7 @@
-
+
-
+
@@ -244,7 +244,7 @@
-
+
@@ -303,7 +303,7 @@
-
+
-
+
@@ -335,7 +335,7 @@
-
+
@@ -372,49 +372,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<TargetConfig>
-<Properties property_0="" property_3="NXP" property_4="LPC1347" property_count="5" version="1"/>
-<infoList vendor="NXP"><info chip="LPC1347" match_id="0x08020543" name="LPC1347" stub="crt_emu_lpc11_13_nxp"><chip><name>LPC1347</name>
-<family>LPC13xx (12bit ADC)</family>
+<Properties property_0="" property_3="NXP" property_4="LPC11U37/401" property_count="5" version="1"/>
+<infoList vendor="NXP"><info chip="LPC11U37/401" match_id="0x00017C40" name="LPC11U37/401" stub="crt_emu_lpc11_13_nxp"><chip><name>LPC11U37/401</name>
+<family>LPC11Uxx</family>
<vendor>NXP (formerly Philips)</vendor>
<reset board="None" core="Real" sys="Real"/>
<clock changeable="TRUE" freq="12MHz" is_accurate="TRUE"/>
<memory can_program="true" id="Flash" is_ro="true" type="Flash"/>
<memory id="RAM" type="RAM"/>
<memory id="Periph" is_volatile="true" type="Peripheral"/>
-<memoryInstance derived_from="Flash" id="MFlash64" location="0x0" size="0x10000"/>
+<memoryInstance derived_from="Flash" id="MFlash128" location="0x0" size="0x20000"/>
<memoryInstance derived_from="RAM" id="RamLoc8" location="0x10000000" size="0x2000"/>
<memoryInstance derived_from="RAM" id="RamUsb2" location="0x20004000" size="0x800"/>
-<memoryInstance derived_from="RAM" id="RamPeriph2" location="0x20000000" size="0x800"/>
-<prog_flash blocksz="0x1000" location="0x0" maxprgbuff="0x400" progwithcode="TRUE" size="0x10000"/>
-<peripheralInstance derived_from="V7M_MPU" id="MPU" location="0xe000ed90"/>
-<peripheralInstance derived_from="V7M_NVIC" id="NVIC" location="0xe000e000"/>
-<peripheralInstance derived_from="V7M_DCR" id="DCR" location="0xe000edf0"/>
-<peripheralInstance derived_from="V7M_ITM" id="ITM" location="0xe0000000"/>
-<peripheralInstance derived_from="I2C" id="I2C" location="0x40000000"/>
-<peripheralInstance derived_from="WWDT" id="WWDT" location="0x40004000"/>
-<peripheralInstance derived_from="USART" id="USART" location="0x40008000"/>
-<peripheralInstance derived_from="CT16B0" id="CT16B0" location="0x4000c000"/>
-<peripheralInstance derived_from="CT16B1" id="CT16B1" location="0x40010000"/>
-<peripheralInstance derived_from="CT32B0" id="CT32B0" location="0x40014000"/>
-<peripheralInstance derived_from="CT32B1" id="CT32B1" location="0x40018000"/>
-<peripheralInstance derived_from="ADC" id="ADC" location="0x4001c000"/>
-<peripheralInstance derived_from="PMU" id="PMU" location="0x40038000"/>
-<peripheralInstance derived_from="FLASHCTRL" id="FLASHCTRL" location="0x4003c000"/>
-<peripheralInstance derived_from="SSP0" id="SSP0" location="0x40040000"/>
-<peripheralInstance derived_from="IOCON" id="IOCON" location="0x40044000"/>
-<peripheralInstance derived_from="SYSCON" id="SYSCON" location="0x40048000"/>
-<peripheralInstance derived_from="GPIO-PIN-INT" id="GPIO-PIN-INT" location="0x4004c000"/>
-<peripheralInstance derived_from="SSP1" id="SSP1" location="0x40058000"/>
-<peripheralInstance derived_from="GPIO-GROUP-INT0" id="GPIO-GROUP-INT0" location="0x4005c000"/>
-<peripheralInstance derived_from="GPIO-GROUP-INT1" id="GPIO-GROUP-INT1" location="0x40060000"/>
-<peripheralInstance derived_from="RITIMER" id="RITIMER" location="0x40064000"/>
-<peripheralInstance derived_from="USB" id="USB" location="0x40080000"/>
-<peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x50000000"/>
+<prog_flash blocksz="0x1000" location="0x0" maxprgbuff="0x400" progwithcode="TRUE" size="0x20000"/>
+<peripheralInstance derived_from="CM0_NVIC" id="NVIC" location="0xe000e000"/>
+<peripheralInstance derived_from="LPC11U_GPIO" id="GPIO" location="0x50000000"/>
+<peripheralInstance derived_from="LPC11U_USBDEV" id="USB" location="0x40080000"/>
+<peripheralInstance derived_from="CM0_DCR" id="DCR" location="0xe000edf0"/>
+<peripheralInstance derived_from="LPC11U_GPIO_GROUP_INT" id="GPIOGROUP0INT" location="0x40060000"/>
+<peripheralInstance derived_from="LPC11U_GPIO_GROUP_INT" id="GPIOGROUP1INT" location="0x4005c000"/>
+<peripheralInstance derived_from="LPC11U_GPIO_INT" id="GPIOINT" location="0x4004c000"/>
+<peripheralInstance derived_from="LPC11_13_SSP" id="SSP1" location="0x40058000"/>
+<peripheralInstance derived_from="LPC11U_FMC" id="FMC" location="0x4003c000"/>
+<peripheralInstance derived_from="LPC11U_SYSCTL" id="SYSCTL" location="0x40048000"/>
+<peripheralInstance derived_from="LPC11U_IOCON" id="IOCON" location="0x40044000"/>
+<peripheralInstance derived_from="LPC11_13_SSP" id="SSP0" location="0x40040000"/>
+<peripheralInstance derived_from="LPC11_13_PMU" id="PMU" location="0x40038000"/>
+<peripheralInstance derived_from="LPC11_13_ADC" id="ADC" location="0x4001c000"/>
+<peripheralInstance derived_from="LPC11_13_TIMER32" id="TIMER1" location="0x40018000"/>
+<peripheralInstance derived_from="LPC11_13_TIMER32" id="TIMER0" location="0x40014000"/>
+<peripheralInstance derived_from="LPC11_13_TIMER16" id="TMR161" location="0x40010000"/>
+<peripheralInstance derived_from="LPC11_13_TIMER16" id="TMR160" location="0x4000c000"/>
+<peripheralInstance derived_from="LPC1xxx_UART_MODEM" id="UART0" location="0x40008000"/>
+<peripheralInstance derived_from="LPC11_13_WDT" id="WDT" location="0x40004000"/>
+<peripheralInstance derived_from="LPC11_13_I2C" id="I2C0" location="0x40000000"/>
</chip>
-<processor><name gcc_name="cortex-m3">Cortex-M3</name>
+<processor><name gcc_name="cortex-m0">Cortex-M0</name>
<family>Cortex-M</family>
</processor>
-<link href="nxp_lpc13Uxx_peripheral.xme" show="embed" type="simple"/>
+<link href="nxp_lpc11_13_peripheral.xme" show="embed" type="simple"/>
</info>
</infoList>
</TargetConfig>
diff --git a/tinyusb/device/dcd_lpc_11uxx_13uxx.c b/tinyusb/device/dcd_lpc_11uxx_13uxx.c
index b2681c40..1ddf77d9 100644
--- a/tinyusb/device/dcd_lpc_11uxx_13uxx.c
+++ b/tinyusb/device/dcd_lpc_11uxx_13uxx.c
@@ -63,7 +63,7 @@
#define DCD_11U_13U_QHD_COUNT 10
enum {
- DCD_11U_13U_FIXED_ENDPIONT_SIZE = 64
+ DCD_11U_13U_MAX_BYTE_PER_TD = (TUSB_CFG_MCU == MCU_LPC11UXX ? 64 : 1023)
};
enum {
@@ -436,7 +436,7 @@ bool dcd_pipe_is_busy(endpoint_handle_t edpt_hdl)
static void queue_xfer_to_buffer(uint8_t ep_id, uint8_t buff_idx, uint16_t buff_addr_offset, uint16_t total_bytes)
{
- uint16_t const queued_bytes = min16_of(total_bytes, DCD_11U_13U_FIXED_ENDPIONT_SIZE);
+ uint16_t const queued_bytes = min16_of(total_bytes, DCD_11U_13U_MAX_BYTE_PER_TD);
dcd_data.current_td[ep_id].queued_bytes_in_buff[buff_idx] = queued_bytes;
dcd_data.current_td[ep_id].remaining_bytes -= queued_bytes;
@@ -458,9 +458,9 @@ static void pipe_queue_xfer(uint8_t ep_id, uint16_t buff_addr_offset, uint16_t t
// need to queue buffer1 first, as activate buffer0 can causes controller does transferring immediately
// while buffer1 is not ready yet
- if ( total_bytes > DCD_11U_13U_FIXED_ENDPIONT_SIZE)
+ if ( total_bytes > DCD_11U_13U_MAX_BYTE_PER_TD)
{
- queue_xfer_to_buffer(ep_id, 1, buff_addr_offset+1, total_bytes - DCD_11U_13U_FIXED_ENDPIONT_SIZE);
+ queue_xfer_to_buffer(ep_id, 1, buff_addr_offset+1, total_bytes - DCD_11U_13U_MAX_BYTE_PER_TD);
}
queue_xfer_to_buffer(ep_id, 0, buff_addr_offset, total_bytes);