Changeset 429 for EcnlProtoTool/trunk/asp3_dcre/mbed/hal/sleep_api.h
- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/mbed/hal/sleep_api.h
r321 r429 1 2 /** \addtogroup hal */ 3 /** @{*/ 1 4 /* mbed Microcontroller Library 2 5 * Copyright (c) 2006-2013 ARM Limited … … 25 28 #endif 26 29 30 /** 31 * \defgroup hal_sleep sleep hal requirements 32 * Low level interface to the sleep mode of a target. 33 * 34 * # Defined behaviour 35 * 36 * * Sleep mode 37 * * wake-up time should be less than 10 us - Verified by sleep_usticker_test(). 38 * * the processor can be woken up by any internal peripheral interrupt - Verified by sleep_usticker_test(). 39 * * all peripherals operate as in run mode - not verified. 40 * * the processor can be woken up by external pin interrupt - not verified. 41 * * Deep sleep 42 * * the wake-up time should be less than 10 ms - Verified by deepsleep_lpticker_test(). 43 * * lp ticker should wake up a target from this mode - Verified by deepsleep_lpticker_test(). 44 * * RTC should wake up a target from this mode - not verified. 45 * * an external interrupt on a pin should wake up a target from this mode - not verified. 46 * * a watchdog timer should wake up a target from this mode - not verified. 47 * * High-speed clocks are turned off - Verified by deepsleep_high_speed_clocks_turned_off_test(). 48 * * RTC keeps time - Verified by rtc_sleep_test(). 49 * 50 * # Undefined behaviour 51 * 52 * * peripherals aside from RTC, GPIO and lp ticker result in undefined behaviour in deep sleep. 53 * @{ 54 */ 55 56 /** 57 * \defgroup hal_sleep_tests sleep hal tests 58 * The sleep HAL tests ensure driver conformance to defined behaviour. 59 * 60 * To run the sleep hal tests use the command: 61 * 62 * mbed test -t <toolchain> -m <target> -n tests-mbed_hal-sleep* 63 * 64 */ 65 27 66 /** Send the microcontroller to sleep 28 67 * 29 * The processor is setup ready for sleep, and sent to sleep using __WFI(). In this mode, the68 * The processor is setup ready for sleep, and sent to sleep. In this mode, the 30 69 * system clock to the core is stopped until a reset or an interrupt occurs. This eliminates 31 70 * dynamic power used by the processor, memory systems and buses. The processor, peripheral and … … 34 73 * The processor can be woken up by any internal peripheral interrupt or external pin interrupt. 35 74 * 36 * @note 37 * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored. 38 * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be 39 * able to access the LocalFileSystem 75 * The wake-up time shall be less than 10 us. 76 * 40 77 */ 41 void sleep(void);78 void hal_sleep(void); 42 79 43 80 /** Send the microcontroller to deep sleep 44 81 * 45 82 * This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode 46 * has the same sleep features as sleep plus it powers down peripherals and clocks. All state47 * is still maintained.83 * has the same sleep features as sleep plus it powers down peripherals and high frequency clocks. 84 * All state is still maintained. 48 85 * 49 * The processor can only be woken up by an external interrupt on a pin or a watchdog timer.86 * The processor can only be woken up by low power ticker, RTC, an external interrupt on a pin or a watchdog timer. 50 87 * 51 * @note 52 * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored. 53 * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be 54 * able to access the LocalFileSystem 88 * The wake-up time shall be less than 10 ms. 55 89 */ 56 void deepsleep(void); 90 void hal_deepsleep(void); 91 92 /**@}*/ 57 93 58 94 #ifdef __cplusplus … … 63 99 64 100 #endif 101 102 /** @}*/
Note:
See TracChangeset
for help on using the changeset viewer.