mbed library sources
Dependents: Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more
Superseded
This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.
Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.
If you are looking for a stable and tested release, please import one of the official mbed library releases:
Import librarymbed
The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Revision 238:bda0417c579a, committed 2014-06-26
- Comitter:
- mbed_official
- Date:
- Thu Jun 26 09:00:08 2014 +0100
- Parent:
- 237:f3da66175598
- Child:
- 239:8cadf13dff33
- Commit message:
- Synchronized with git revision f2f5409d12179efcc2696d5ba1fa299f0f9771f9
Full URL: https://github.com/mbedmicro/mbed/commit/f2f5409d12179efcc2696d5ba1fa299f0f9771f9/
[NUCLEO_F401RE] Fix issue with sleep and ST HAL tick timer
Changed in this revision
targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/sleep.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/sleep.c Tue Jun 24 14:45:08 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/sleep.c Thu Jun 26 09:00:08 2014 +0100 @@ -36,8 +36,16 @@ static TIM_HandleTypeDef TimMasterHandle; void sleep(void) { + TimMasterHandle.Instance = TIM5; + + // Disable HAL tick interrupt + __HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC2); + // Request to enter SLEEP mode HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI); + + // Enable HAL tick interrupt + __HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2); } void deepsleep(void) {