aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F1xx/RTC/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32F1xx/RTC/main.h')
-rw-r--r--testhal/STM32F1xx/RTC/main.h23
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_ */