Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MTS-Serial libmDot mbed-rtos mbed-src
Fork of mDot_AT_firmware by
wakeup.h
00001 #ifndef __WAKEUP_H__ 00002 #define __WAKEUP_H__ 00003 00004 #include <inttypes.h> 00005 00006 uint32_t RTC_ReadBackupRegister(uint32_t RTC_BKP_DR); 00007 00008 void RTC_WriteBackupRegister(uint32_t RTC_BKP_DR, uint32_t Data); 00009 00010 static RTC_HandleTypeDef RtcHandle; 00011 00012 uint32_t wakeup_init(uint32_t seconds); 00013 00014 void wakeup_clear(void); 00015 00016 00017 #ifndef TM_WATCHDOG_H 00018 #define TM_WATCHDOG_H 110 00019 /** 00020 * * @addtogroup TM_STM32F4xx_Libraries 00021 * * @{ 00022 * */ 00023 00024 /** 00025 * * @defgroup TM_WATCHDOG 00026 * * @brief Independent Watchdog timer for STM32F4xx - http://stm32f4-discovery.com/2014/07/library-20-independent-watchdog-timer-on-stm32f4xx/ 00027 * * @{ 00028 * * 00029 * * \par Changelog 00030 * * 00031 * @verbatim 00032 * Version 1.1 00033 * - March 10, 2015 00034 * - Support for STD/HAL drivers 00035 * Version 1.0 00036 * - First release 00037 * @endverbatim 00038 * * 00039 * * \par Dependencies 00040 * * 00041 * @verbatim 00042 * - STM32F4xx 00043 * - defines.h 00044 * @endverbatim 00045 * */ 00046 00047 /** 00048 * * @defgroup TM_WATCHDOG_Typedefs 00049 * * @brief Library Typedefs 00050 * * @{ 00051 * */ 00052 00053 /** 00054 * * @brief Watchdog timeout settings 00055 * */ 00056 typedef enum { 00057 TM_WATCHDOG_Timeout_5ms , /*!< System reset called every 5ms */ 00058 TM_WATCHDOG_Timeout_10ms , /*!< System reset called every 10ms */ 00059 TM_WATCHDOG_Timeout_15ms , /*!< System reset called every 15ms */ 00060 TM_WATCHDOG_Timeout_30ms , /*!< System reset called every 30ms */ 00061 TM_WATCHDOG_Timeout_60ms , /*!< System reset called every 60ms */ 00062 TM_WATCHDOG_Timeout_120ms , /*!< System reset called every 120ms */ 00063 TM_WATCHDOG_Timeout_250ms , /*!< System reset called every 250ms */ 00064 TM_WATCHDOG_Timeout_500ms , /*!< System reset called every 500ms */ 00065 TM_WATCHDOG_Timeout_1s , /*!< System reset called every 1s */ 00066 TM_WATCHDOG_Timeout_2s , /*!< System reset called every 2s */ 00067 TM_WATCHDOG_Timeout_4s /*!< System reset called every 4s */ 00068 } TM_WATCHDOG_Timeout_t; 00069 00070 /** 00071 * * @} 00072 * */ 00073 00074 /** 00075 * * @defgroup TM_WATCHDOG_Functions 00076 * * @brief Library Functions 00077 * * @{ 00078 * */ 00079 00080 /** 00081 * * @brief Initialize Watchdog timer 00082 * * @note After you initialize it, you can't disable it unless reset occur. 00083 * * @param timeout. Timeout value when watchdog reset happen if not reset by user. 00084 * * This parameter can be a value of @ref TM_WATCHDOG_Timeout_t enumeration 00085 * * @retval Value if system was reset because of watchdog timer 00086 * * - 1: Reset happen because of watchdog 00087 * * - 0: Otherwise 00088 * * 00089 * */ 00090 uint8_t TM_WATCHDOG_Init(uint16_t reloa); 00091 00092 /** 00093 * * @brief Reset Watchdog timer 00094 * * @note This function have to be called periodically to reset watchdog timer, or your system will reset 00095 * * @param None 00096 * * @retval None 00097 * */ 00098 void TM_WATCHDOG_Reset(void); 00099 00100 /** 00101 * * @} 00102 * */ 00103 00104 /** 00105 * * @} 00106 * */ 00107 00108 /** 00109 * * @} 00110 * */ 00111 00112 #endif 00113 00114 #endif // __WAKEUP_H__
Generated on Tue Jul 12 2022 21:40:58 by
1.7.2
