STM32F030 and RTC
Posted: Fri May 06, 2016 1:53 am
Hi,
GCC-4.9.3, newlib-2.2.0, binutils-2.25, ChibiOS-3.0.5
I'm playing with a new chip, namely STM32F030. I'm interested in using its RTC to set an alarm and wake the device up after a snooze. I used the testhal/STM32F1xx/RTC program as a starting point and enabled the HAL_USE_RTC. When I try to compile, I get
After looking in the specific rtc_lld.h, I see it is because STM32_HAS_PERIODIC_WAKEUPS is not defined in stm32_registry.h for this device. According to this the device's RTC does have periodic wakeup. I'm not sure how to fix this, help/advice is appreciated!
GCC-4.9.3, newlib-2.2.0, binutils-2.25, ChibiOS-3.0.5
I'm playing with a new chip, namely STM32F030. I'm interested in using its RTC to set an alarm and wake the device up after a snooze. I used the testhal/STM32F1xx/RTC program as a starting point and enabled the HAL_USE_RTC. When I try to compile, I get
Code: Select all
main.c:133:3: warning: implicit declaration of function ‘rtcSTM32GetSecMsec’ [-Wimplicit-function-declaration]
rtcSTM32GetSecMsec(&RTCD1, &tv_sec, NULL);
^
main.c:133:31: error: ‘tv_sec’ undeclared (first use in this function)
rtcSTM32GetSecMsec(&RTCD1, &tv_sec, NULL);
^
main.c:133:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:134:12: error: ‘RTCAlarm’ has no member named ‘tv_sec’
alarmspec.tv_sec = tv_sec + 20;
After looking in the specific rtc_lld.h, I see it is because STM32_HAS_PERIODIC_WAKEUPS is not defined in stm32_registry.h for this device. According to this the device's RTC does have periodic wakeup. I'm not sure how to fix this, help/advice is appreciated!