diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-31 15:27:46 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-31 15:27:46 +0000 |
commit | 7fd48a4a3f590d6cfe7cd98fe7dd96c7498f08e2 (patch) | |
tree | 44e5e9600eb6efad7ee704f39ff8a3fd83c3080f /testhal/STM32F1xx/RTC/main.h | |
parent | c8f60c27e1cdcd9d5a5592287d453d8d1fe0051f (diff) | |
download | ChibiOS-7fd48a4a3f590d6cfe7cd98fe7dd96c7498f08e2.tar.gz ChibiOS-7fd48a4a3f590d6cfe7cd98fe7dd96c7498f08e2.tar.bz2 ChibiOS-7fd48a4a3f590d6cfe7cd98fe7dd96c7498f08e2.zip |
RTC. Hal test added.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rtc_dev@3272 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F1xx/RTC/main.h')
-rw-r--r-- | testhal/STM32F1xx/RTC/main.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testhal/STM32F1xx/RTC/main.h b/testhal/STM32F1xx/RTC/main.h new file mode 100644 index 000000000..31bd85a76 --- /dev/null +++ b/testhal/STM32F1xx/RTC/main.h @@ -0,0 +1,23 @@ +#ifndef MAIN_H_
+#define MAIN_H_
+
+/******************************************************************
+ * глобальные флаги
+ ******************************************************************/
+/* надо ли фильтровать данные с датчиков */
+#define GET_FILTERED_DATA TRUE
+
+/* включить стрессовое тестирование */
+#define ENABLE_IRQ_STORM FALSE
+
+// usefull macros
+#define WATCHDOG_INIT {\
+ DBGMCU->CR |= DBGMCU_CR_DBG_IWDG_STOP; /* stop watchdog timer in debugging mode */\
+ IWDG->KR = 0x5555;/*unlock PR register*/\
+ IWDG->PR = 16;/*set 1.6384s timeout*/\
+ IWDG->KR = 0xCCCC;/*start watchdog*/}
+
+#define WATCHDOG_RELOAD {IWDG->KR = 0xAAAA;}
+
+
+#endif /* MAIN_H_ */
|