From dff0df96d8d6b757a610020a84cc3fa3754241fe Mon Sep 17 00:00:00 2001 From: ccli8 Date: Fri, 16 Jun 2017 13:34:48 +0800 Subject: [PATCH] Add internal configuration control_01 --- targets/TARGET_NUVOTON/TARGET_M480/device/system_M480.c | 8 ++++++++ targets/TARGET_NUVOTON/TARGET_M480/mbed_lib.json | 4 ++++ 2 files changed, 12 insertions(+) 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 } } }