update for gr_citurs

This commit is contained in:
kkitayam
2021-03-24 00:53:55 +09:00
parent 13735eb21d
commit f8cf88f918
4 changed files with 141 additions and 44 deletions
+1 -4
View File
@@ -28,6 +28,7 @@ MCU_DIR = hw/mcu/renesas/rx63n
LD_FILE = hw/bsp/$(BOARD)/r5f5631fd.ld
SRC_C += \
src/portable/renesas/usba/dcd_usba.c \
$(MCU_DIR)/vects.c
INC += \
@@ -36,10 +37,6 @@ INC += \
SRC_S += $(MCU_DIR)/start.S
# For TinyUSB port source
VENDOR = renesas
CHIP_FAMILY = usba
# For freeRTOS port source
FREERTOS_PORT = RX600
+6 -2
View File
@@ -29,7 +29,7 @@
#include "interrupt_handlers.h"
#define IRQ_PRIORITY_CMT0 5
#define IRQ_PRIORITY_USBI0 5
#define IRQ_PRIORITY_USBI0 6
#define IRQ_PRIORITY_SCI0 5
#define SYSTEM_PRCR_PRC1 (1<<1)
@@ -146,13 +146,17 @@ void board_init(void)
MPC.P20PFS.BYTE = 0b01010;
PORT2.PMR.BIT.B1 = 1U;
MPC.P21PFS.BYTE = 0b01010;
/* USB VBUS -> P16, RXD0 => P21, TXD0 => P20 */
/* USB VBUS -> P16 DPUPE -> P14 */
PORT1.PMR.BIT.B4 = 1U;
PORT1.PMR.BIT.B6 = 1U;
MPC.P14PFS.BYTE = 0b10001;
MPC.P16PFS.BYTE = MPC_PFS_ISEL | 0b10001;
MPC.PFUSB0.BIT.PUPHZS = 1;
/* Lock MPC registers */
MPC.PWPR.BIT.PFSWE = 0;
MPC.PWPR.BIT.B0WI = 1;
IR(USB0, USBI0) = 0;
IPR(USB0, USBI0) = IRQ_PRIORITY_USBI0;
/* Enable SCI0 */