diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-16 13:18:55 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-16 13:18:55 +0000 |
commit | 172680aea3057dcea62fc4a053510d2dd03bb911 (patch) | |
tree | 29b6239f1808ce8df31961f5bce7986081c321e4 | |
parent | edcb16ebebc3a72f5df73e883949255b30f64d74 (diff) | |
download | ChibiOS-172680aea3057dcea62fc4a053510d2dd03bb911.tar.gz ChibiOS-172680aea3057dcea62fc4a053510d2dd03bb911.tar.bz2 ChibiOS-172680aea3057dcea62fc4a053510d2dd03bb911.zip |
RTC. Nop.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3617 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | boards/NONSTANDARD_STM32F4_BARTHESS1/board.h | 2 | ||||
-rw-r--r-- | os/hal/platforms/STM32/RTCv2/rtc_lld.c | 2 | ||||
-rw-r--r-- | testhal/STM32F4xx/RTC/main.c | 1 | ||||
-rw-r--r-- | testhal/STM32F4xx/RTC/mcuconf.h | 2 |
4 files changed, 5 insertions, 2 deletions
diff --git a/boards/NONSTANDARD_STM32F4_BARTHESS1/board.h b/boards/NONSTANDARD_STM32F4_BARTHESS1/board.h index c0c85dde0..3f2183e2c 100644 --- a/boards/NONSTANDARD_STM32F4_BARTHESS1/board.h +++ b/boards/NONSTANDARD_STM32F4_BARTHESS1/board.h @@ -316,7 +316,7 @@ PIN_MODE_ALTERNATE(GPIOC_SDIO_D2) | \
PIN_MODE_ALTERNATE(GPIOC_SDIO_D3) | \
PIN_MODE_ALTERNATE(GPIOC_SDIO_CK) | \
- PIN_MODE_OUTPUT(GPIOC_TAMPER_RTC) | \
+ PIN_MODE_INPUT(GPIOC_TAMPER_RTC) | \
PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
PIN_MODE_INPUT(GPIOC_OSC32_OUT))
diff --git a/os/hal/platforms/STM32/RTCv2/rtc_lld.c b/os/hal/platforms/STM32/RTCv2/rtc_lld.c index ca15dc1b9..171105a75 100644 --- a/os/hal/platforms/STM32/RTCv2/rtc_lld.c +++ b/os/hal/platforms/STM32/RTCv2/rtc_lld.c @@ -186,7 +186,7 @@ void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec) { ;
#if STM32_RTC_HAS_SUBSECONDS
- timespec->tv_msec = (1000 * (RTCD1.id_rtc->PRER & 0x7FFF) - RTCD1.id_rtc->SSR) /
+ timespec->tv_msec = (1000 * ((RTCD1.id_rtc->PRER & 0x7FFF) - RTCD1.id_rtc->SSR)) /
((RTCD1.id_rtc->PRER & 0x7FFF) + 1);
#endif /* STM32_RTC_HAS_SUBSECONDS */
timespec->tv_time = RTCD1.id_rtc->TR;
diff --git a/testhal/STM32F4xx/RTC/main.c b/testhal/STM32F4xx/RTC/main.c index 8864e0f01..f8bd9fa85 100644 --- a/testhal/STM32F4xx/RTC/main.c +++ b/testhal/STM32F4xx/RTC/main.c @@ -54,6 +54,7 @@ static inline void exti_rtcwakeup_cb(EXTDriver *extp, expchannel_t channel){ if (RTCD1.id_rtc->ISR | RTC_ISR_WUTF){
RTCD1.id_rtc->ISR &= ~RTC_ISR_WUTF;
}
+ palTogglePad(GPIOB, GPIOB_LED_B);
palTogglePad(GPIOB, GPIOB_LED_R);
}
diff --git a/testhal/STM32F4xx/RTC/mcuconf.h b/testhal/STM32F4xx/RTC/mcuconf.h index 5bbeca57c..80f6c3866 100644 --- a/testhal/STM32F4xx/RTC/mcuconf.h +++ b/testhal/STM32F4xx/RTC/mcuconf.h @@ -37,6 +37,8 @@ */
#define STM32_NO_INIT FALSE
#define STM32_VOS STM32_VOS_HIGH
+#define STM32_PLS STM32_PLS_LEV0
+#define STM32_PVD_ENABLE TRUE
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED FALSE
#define STM32_HSE_ENABLED TRUE
|