diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-11-27 19:55:59 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-11-27 19:55:59 +0000 |
commit | 47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215 (patch) | |
tree | fb344c8f0a469e5eb68701f08e417d1037215081 /testhal/STM32F1xx/RTC/main.h | |
parent | 076e7453bf812c59f38cda94dd0379b6f03af0d0 (diff) | |
parent | e5ce81050f699c61b43aa74384d011c861fb31f2 (diff) | |
download | ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.tar.gz ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.tar.bz2 ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.zip |
I2C branch. Goals: DMA-based driver, stm32f4x port.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3541 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_ */
|