Skip to content

Commit 1133698

Browse files
author
Adrian Negreanu
committed
lpc4322: enable high-speed usb
Signed-off-by: Adrian Negreanu <[email protected]>
1 parent 9e5ebfc commit 1133698

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

source/hic_hal/nxp/lpc4322/daplink_addr.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
#define DAPLINK_SECTOR_SIZE 0x00002000
5757
#define DAPLINK_MIN_WRITE_SIZE 0x00000400
5858

59+
#define DAPLINK_RAM_APP2_START 0x10080000
60+
#define DAPLINK_RAM_APP2_SIZE 0x0000A000
61+
5962
/* Current build */
6063

6164
#if defined(DAPLINK_BL)

source/hic_hal/nxp/lpc4322/usb_config.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
// <o0.0> High-speed
3232
// <i> Enable high-speed functionality (if device supports it)
33-
#define USBD_HS_ENABLE 0
33+
#define USBD_HS_ENABLE 1
3434
#if (defined(WEBUSB_INTERFACE) || defined(WINUSB_INTERFACE) || defined(BULK_ENDPOINT))
3535
#define USBD_BOS_ENABLE 1
3636
#else
@@ -56,7 +56,7 @@
5656
#define USBD_MAX_PACKET0 64
5757
#define USBD_DEVDESC_IDVENDOR 0x0D28
5858
#define USBD_DEVDESC_IDPRODUCT 0x0204
59-
#define USBD_DEVDESC_BCDDEVICE 0x0100
59+
#define USBD_DEVDESC_BCDDEVICE 0x1000
6060

6161
// <h> Configuration Settings
6262
// <i> These settings affect Configuration Descriptor
@@ -157,9 +157,9 @@
157157
#define USBD_HID_EP_INTIN_STACK 0
158158
#define USBD_HID_WMAXPACKETSIZE 64
159159
#define USBD_HID_BINTERVAL 1
160-
#define USBD_HID_HS_ENABLE 0
160+
#define USBD_HID_HS_ENABLE 1
161161
#define USBD_HID_HS_WMAXPACKETSIZE 64
162-
#define USBD_HID_HS_BINTERVAL 6
162+
#define USBD_HID_HS_BINTERVAL 1
163163
#define USBD_HID_STRDESC L"CMSIS-DAP v1"
164164
#define USBD_WEBUSB_STRDESC L"WebUSB: CMSIS-DAP"
165165
#define USBD_HID_INREPORT_NUM 1
@@ -208,7 +208,7 @@
208208
#define USBD_MSC_EP_BULKOUT 2
209209
#define USBD_MSC_EP_BULKIN_STACK 0
210210
#define USBD_MSC_WMAXPACKETSIZE 64
211-
#define USBD_MSC_HS_ENABLE 0
211+
#define USBD_MSC_HS_ENABLE 1
212212
#define USBD_MSC_HS_WMAXPACKETSIZE 512
213213
#define USBD_MSC_HS_BINTERVAL 0
214214
#define USBD_MSC_STRDESC L"USB_MSC"
@@ -328,20 +328,20 @@
328328
#define USBD_CDC_ACM_EP_INTIN_STACK 0
329329
#define USBD_CDC_ACM_WMAXPACKETSIZE 16
330330
#define USBD_CDC_ACM_BINTERVAL 32
331-
#define USBD_CDC_ACM_HS_ENABLE 0
332-
#define USBD_CDC_ACM_HS_WMAXPACKETSIZE 16
331+
#define USBD_CDC_ACM_HS_ENABLE 1
332+
#define USBD_CDC_ACM_HS_WMAXPACKETSIZE 64
333333
#define USBD_CDC_ACM_HS_BINTERVAL 2
334334
#define USBD_CDC_ACM_EP_BULKIN 4
335335
#define USBD_CDC_ACM_EP_BULKOUT 4
336336
#define USBD_CDC_ACM_EP_BULKIN_STACK 0
337337
#define USBD_CDC_ACM_WMAXPACKETSIZE1 64
338-
#define USBD_CDC_ACM_HS_ENABLE1 0
339-
#define USBD_CDC_ACM_HS_WMAXPACKETSIZE1 64
340-
#define USBD_CDC_ACM_HS_BINTERVAL1 0
338+
#define USBD_CDC_ACM_HS_ENABLE1 1
339+
#define USBD_CDC_ACM_HS_WMAXPACKETSIZE1 512
340+
#define USBD_CDC_ACM_HS_BINTERVAL1 1
341341
#define USBD_CDC_ACM_CIF_STRDESC L"mbed Serial Port"
342342
#define USBD_CDC_ACM_DIF_STRDESC L"mbed Serial Port"
343-
#define USBD_CDC_ACM_SENDBUF_SIZE 64
344-
#define USBD_CDC_ACM_RECEIVEBUF_SIZE 64
343+
#define USBD_CDC_ACM_SENDBUF_SIZE USBD_CDC_ACM_HS_WMAXPACKETSIZE1
344+
#define USBD_CDC_ACM_RECEIVEBUF_SIZE USBD_CDC_ACM_HS_WMAXPACKETSIZE1
345345
#if (((USBD_CDC_ACM_HS_ENABLE1) && (USBD_CDC_ACM_SENDBUF_SIZE < USBD_CDC_ACM_HS_WMAXPACKETSIZE1)) || (USBD_CDC_ACM_SENDBUF_SIZE < USBD_CDC_ACM_WMAXPACKETSIZE1))
346346
#error "Send Buffer size must be larger or equal to Bulk In maximum packet size!"
347347
#endif
@@ -388,7 +388,7 @@
388388
#define USBD_BULK_EP_BULKIN 5
389389
#define USBD_BULK_EP_BULKOUT 5
390390
#define USBD_BULK_WMAXPACKETSIZE 64
391-
#define USBD_BULK_HS_ENABLE 0
391+
#define USBD_BULK_HS_ENABLE 1
392392
#define USBD_BULK_HS_WMAXPACKETSIZE 512
393393
#define USBD_BULK_STRDESC L"CMSIS-DAP v2"
394394

0 commit comments

Comments
 (0)