summaryrefslogtreecommitdiff
path: root/tinyusb/hal
diff options
context:
space:
mode:
Diffstat (limited to 'tinyusb/hal')
-rw-r--r--tinyusb/hal/hal_lpc13uxx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tinyusb/hal/hal_lpc13uxx.c b/tinyusb/hal/hal_lpc13uxx.c
index 29128eec4..d4e3fa984 100644
--- a/tinyusb/hal/hal_lpc13uxx.c
+++ b/tinyusb/hal/hal_lpc13uxx.c
@@ -49,8 +49,11 @@ tusb_error_t hal_init(void)
/* Pull-down is needed, or internally, VBUS will be floating. This is to
address the wrong status in VBUSDebouncing bit in CmdStatus register. */
+ // set PIO0_3 as USB_VBUS
LPC_IOCON->PIO0_3 &= ~0x1F;
LPC_IOCON->PIO0_3 |= (0x01<<0); /* Secondary function VBUS */
+
+ // set PIO0_6 as usb connect
LPC_IOCON->PIO0_6 &= ~0x07;
LPC_IOCON->PIO0_6 |= (0x01<<0); /* Secondary function SoftConn */