diff --git a/targets/TARGET_NUVOTON/TARGET_M480/device/system_M480.c b/targets/TARGET_NUVOTON/TARGET_M480/device/system_M480.c index 827b92f1b0..1aa070152c 100644 --- a/targets/TARGET_NUVOTON/TARGET_M480/device/system_M480.c +++ b/targets/TARGET_NUVOTON/TARGET_M480/device/system_M480.c @@ -88,5 +88,13 @@ void SystemInit (void) SPIM_DISABLE_CACHE(); SPIM_ENABLE_CCM(); while (! SPIM_IS_CCM_EN()); + +#ifndef MBED_CONF_M480_CTRL01_ENABLE +#define MBED_CONF_M480_CTRL01_ENABLE 1 +#endif + +#if (! MBED_CONF_M480_CTRL01_ENABLE) + M32(0x4000c018) |= 0x00000080; +#endif } /*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/ diff --git a/targets/TARGET_NUVOTON/TARGET_M480/mbed_lib.json b/targets/TARGET_NUVOTON/TARGET_M480/mbed_lib.json index 198e8de55c..b762bc2b36 100644 --- a/targets/TARGET_NUVOTON/TARGET_M480/mbed_lib.json +++ b/targets/TARGET_NUVOTON/TARGET_M480/mbed_lib.json @@ -20,6 +20,10 @@ "usb-device-hsusbd": { "help": "Select high-speed USB device or not", "value": 1 + }, + "ctrl01-enable": { + "help": "Enable control_01", + "value": 0 } } }