mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
Diff: targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_pwr.c
- Revision:
- 226:b062af740e40
- Parent:
- 106:ced8cbb51063
diff -r 2af4c5d0160c -r b062af740e40 targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_pwr.c --- a/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_pwr.c Wed Jun 11 09:30:07 2014 +0100 +++ b/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_pwr.c Wed Jun 11 09:45:09 2014 +0100 @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f4xx_hal_pwr.c * @author MCD Application Team - * @version V1.0.0 - * @date 18-February-2014 + * @version V1.1.0RC2 + * @date 14-May-2014 * @brief PWR HAL module driver. * This file provides firmware functions to manage the following * functionalities of the Power Controller (PWR) peripheral: @@ -276,6 +276,9 @@ { __HAL_PVD_EXTI_ENABLE_IT(PWR_EXTI_LINE_PVD); } + /* Clear the edge trigger for the EXTI Line 16 (PVD) */ + EXTI->RTSR &= ~EXTI_RTSR_TR16; + EXTI->FTSR &= ~EXTI_FTSR_TR16; /* Configure the rising edge */ if((sConfigPVD->Mode == PWR_MODE_IT_RISING_FALLING) ||\ (sConfigPVD->Mode == PWR_MODE_IT_RISING)) @@ -312,7 +315,7 @@ /** * @brief Enables the WakeUp PINx functionality. - * @param WakeUpPinx: Specifies the Power Wake-Up pin to enable + * @param WakeUpPinx: Specifies the Power Wake-Up pin to enable. * This parameter can be one of the following values: * @arg PWR_WAKEUP_PIN1 * @retval None @@ -326,7 +329,7 @@ /** * @brief Disables the WakeUp PINx functionality. - * @param WakeUpPinx: Specifies the Power Wake-Up pin to disable + * @param WakeUpPinx: Specifies the Power Wake-Up pin to disable. * This parameter can be one of the following values: * @arg PWR_WAKEUP_PIN1 * @retval None @@ -363,10 +366,7 @@ /* Check the parameters */ assert_param(IS_PWR_REGULATOR(Regulator)); assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry)); - - /* Disable SysTick Timer */ - SysTick->CTRL &= 0xFE; - + /* Select SLEEP mode entry -------------------------------------------------*/ if(SLEEPEntry == PWR_SLEEPENTRY_WFI) { @@ -376,11 +376,10 @@ else { /* Request Wait For Event */ + __SEV(); + __WFE(); __WFE(); } - - /* Enable SysTick Timer */ - SysTick->CTRL |= 0x01; } /** @@ -490,8 +489,8 @@ /** * @brief PWR PVD interrupt callback - * @param none - * @retval none + * @param None + * @retval None */ __weak void HAL_PWR_PVDCallback(void) {