From: arighi Date: Mon, 7 Feb 2011 10:50:43 +0000 (+0000) Subject: STM32: RTC: add dependency of module "proc" X-Git-Tag: 2.7.0~283 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=abfc101345b4d65ed18df65f39f02e3c8e78a299;p=bertos.git STM32: RTC: add dependency of module "proc" The RTC driver makes use of cpu_relax(). Be sure the proc module has been properly initialized before starting the RTC when CONFIG_KERN is enabled. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4683 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/cortex-m3/drv/rtc_stm32.c b/bertos/cpu/cortex-m3/drv/rtc_stm32.c index 76aae3dd..9354a669 100644 --- a/bertos/cpu/cortex-m3/drv/rtc_stm32.c +++ b/bertos/cpu/cortex-m3/drv/rtc_stm32.c @@ -118,6 +118,9 @@ void rtc_setTime(uint32_t val) /* Initialize the RTC clock */ int rtc_init(void) { +#if CONFIG_KERN + MOD_CHECK(proc); +#endif /* Enable clock for Power interface */ RCC->APB1ENR |= RCC_APB1_PWR;