I'm trying to use the library on a STM32F103C8T6,
but compilation fails:
src/Device/WakeUp_STM_RTC.cpp: In static member function 'static void WakeUp::set_ms(uint32_t)':
src/Device/WakeUp_STM_RTC.cpp:39:10: error: 'struct RTC_TypeDef' has no member named 'WPR'
RTC->WPR = 0xCA; //Disable RTC write protection
^
src/Device/WakeUp_STM_RTC.cpp:40:10: error: 'struct RTC_TypeDef' has no member named 'WPR'
RTC->WPR = 0x53;
^
src/Device/WakeUp_STM_RTC.cpp:43:10: error: 'struct RTC_TypeDef' has no member named 'CR'
RTC->CR &= ~RTC_CR_ALRAE;
^
src/Device/WakeUp_STM_RTC.cpp:43:17: error: 'RTC_CR_ALRAE' was not declared in this scope
RTC->CR &= ~RTC_CR_ALRAE;
^
src/Device/WakeUp_STM_RTC.cpp:44:18: error: 'struct RTC_TypeDef' has no member named 'ISR'
while(!(RTC->ISR & RTC_ISR_ALRAWF));
^
src/Device/WakeUp_STM_RTC.cpp:44:24: error: 'RTC_ISR_ALRAWF' was not declared in this scope
while(!(RTC->ISR & RTC_ISR_ALRAWF));
^
src/Device/WakeUp_STM_RTC.cpp:48:14: error: 'struct RTC_TypeDef' has no member named 'WPR'
RTC->WPR = 0xFF; //Enable RTC write protection
^
src/Device/WakeUp_STM_RTC.cpp:53:32: error: 'struct RTC_TypeDef' has no member named 'PRER'
uint32_t prescaler = (RTC->PRER & 0x7FFF) + 1;
^
src/Device/WakeUp_STM_RTC.cpp:62:29: error: 'struct RTC_TypeDef' has no member named 'SSR'
uint32_t subsecs = RTC->SSR;
^
src/Device/WakeUp_STM_RTC.cpp:91:10: error: 'struct RTC_TypeDef' has no member named 'ALRMAR'
RTC->ALRMAR = alarmreg;
^
src/Device/WakeUp_STM_RTC.cpp:92:10: error: 'struct RTC_TypeDef' has no member named 'ALRMASSR'
RTC->ALRMASSR = subsecs | RTC_ALRMASSR_MASKSS; //Mask no subseconds
^
src/Device/WakeUp_STM_RTC.cpp:92:31: error: 'RTC_ALRMASSR_MASKSS' was not declared in this scope
RTC->ALRMASSR = subsecs | RTC_ALRMASSR_MASKSS; //Mask no subseconds
^
src/Device/WakeUp_STM_RTC.cpp:93:10: error: 'struct RTC_TypeDef' has no member named 'CR'
RTC->CR |= RTC_CR_ALRAE | RTC_CR_ALRAIE; //Enable Alarm
^
src/Device/WakeUp_STM_RTC.cpp:93:31: error: 'RTC_CR_ALRAIE' was not declared in this scope
RTC->CR |= RTC_CR_ALRAE | RTC_CR_ALRAIE; //Enable Alarm
^
src/Device/WakeUp_STM_RTC.cpp:95:10: error: 'struct RTC_TypeDef' has no member named 'WPR'
RTC->WPR = 0xFF; //Enable RTC write protection
^
src/Device/WakeUp_STM_RTC.cpp: In static member function 'static void WakeUp::irq_handler()':
src/Device/WakeUp_STM_RTC.cpp:110:10: error: 'struct RTC_TypeDef' has no member named 'ISR'
RTC->ISR &= ~RTC_ISR_ALRAF;
^
src/Device/WakeUp_STM_RTC.cpp:110:18: error: 'RTC_ISR_ALRAF' was not declared in this scope
RTC->ISR &= ~RTC_ISR_ALRAF;
^
src/Device/WakeUp_STM_RTC.cpp:111:10: error: 'struct RTC_TypeDef' has no member named 'WPR'
RTC->WPR = 0xCA; //Disable RTC write protection
^
src/Device/WakeUp_STM_RTC.cpp:112:10: error: 'struct RTC_TypeDef' has no member named 'WPR'
RTC->WPR = 0x53;
^
src/Device/WakeUp_STM_RTC.cpp:113:10: error: 'struct RTC_TypeDef' has no member named 'CR'
RTC->CR &= ~RTC_CR_ALRAE;
^
src/Device/WakeUp_STM_RTC.cpp:113:17: error: 'RTC_CR_ALRAE' was not declared in this scope
RTC->CR &= ~RTC_CR_ALRAE;
^
src/Device/WakeUp_STM_RTC.cpp:114:10: error: 'struct RTC_TypeDef' has no member named 'WPR'
RTC->WPR = 0xFF; //Enable RTC write protection
Seems the registers are totaly different on STM32F1s:
Created 8 years, 9 months ago.Updated 8 years, 9 months ago.
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.