diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-09-02 13:11:14 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-09-02 13:11:14 +0000 |
commit | c757d88167076c3cfb46b023a3f246ef2b4e77d3 (patch) | |
tree | 298d626f743d7a44749d3f42d32b36e668fce65b /testhal/STM32F1xx/RTC/main.h | |
parent | 84fcd0571ea085d691ca0f8d6d099aa870c384a3 (diff) | |
parent | 8a3ce5e27333e4dc6bd8047c440b84f3060d7d0e (diff) | |
download | ChibiOS-c757d88167076c3cfb46b023a3f246ef2b4e77d3.tar.gz ChibiOS-c757d88167076c3cfb46b023a3f246ef2b4e77d3.tar.bz2 ChibiOS-c757d88167076c3cfb46b023a3f246ef2b4e77d3.zip |
RTC. Merge to trunk.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3281 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_ */
|