From 0de8335c201ffe17b0598150971a7d055ec08999 Mon Sep 17 00:00:00 2001 From: Sissors Date: Thu, 11 Sep 2014 08:33:44 +0200 Subject: [PATCH] [K22F] Sleep/deepsleep verified to work Works properly with waking from interruptin, not from timeout from regular sleep, but thats the nature of the current KSDK Ticker timer used, can be changed later on :) --- .../hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/device.h | 2 +- libraries/tests/mbed/sleep/main.cpp | 2 ++ workspace_tools/tests.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/device.h b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/device.h index 546f3055d3..8f3ef7e125 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/device.h +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/device.h @@ -45,7 +45,7 @@ #define DEVICE_LOCALFILESYSTEM 0 #define DEVICE_ID_LENGTH 24 -#define DEVICE_SLEEP 0 +#define DEVICE_SLEEP 1 #define DEVICE_DEBUG_AWARENESS 0 diff --git a/libraries/tests/mbed/sleep/main.cpp b/libraries/tests/mbed/sleep/main.cpp index 6922b1ea4d..77f25a7d19 100644 --- a/libraries/tests/mbed/sleep/main.cpp +++ b/libraries/tests/mbed/sleep/main.cpp @@ -2,6 +2,8 @@ #if defined(TARGET_LPC4088) InterruptIn wkp(P2_10); +#elif defined(TARGET_K22F) +InterruptIn wkp(D0); #else InterruptIn wkp(p14); #endif diff --git a/workspace_tools/tests.py b/workspace_tools/tests.py index 47a9b76ce2..484dbe80db 100644 --- a/workspace_tools/tests.py +++ b/workspace_tools/tests.py @@ -312,7 +312,7 @@ TESTS = [ "source_dir": join(TEST_DIR, "mbed", "sleep"), "dependencies": [MBED_LIBRARIES, TEST_MBED_LIB], "duration": 30, - "mcu": ["LPC1768", "LPC11U24", "LPC4088","NRF51822"] + "mcu": ["LPC1768", "LPC11U24", "LPC4088","NRF51822","K22F"] }, { "id": "MBED_5", "description": "PWM",