mirror of https://github.com/ARMmbed/mbed-os.git
RTC compiles and doesn't crash anymore, but also doesn't run
parent
6585203559
commit
c9194f0f9e
|
@ -35,7 +35,7 @@
|
|||
|
||||
#define DEVICE_CAN 0
|
||||
|
||||
#define DEVICE_RTC 0
|
||||
#define DEVICE_RTC 1
|
||||
|
||||
#define DEVICE_ETHERNET 0
|
||||
|
||||
|
|
|
@ -26,8 +26,9 @@ void rtc_init(void) {
|
|||
if (PinMap_RTC[0].pin == NC) {
|
||||
RTC_HAL_SetOscillatorCmd(RTC_BASE, true);
|
||||
}
|
||||
SIM_HAL_EnableRtcClock(RTC_BASE, 0U);
|
||||
SIM_HAL_EnableRtcClock(SIM_BASE, 0U);
|
||||
RTC_HAL_SetSecsReg(RTC_BASE, 1);
|
||||
RTC_HAL_Enable(RTC_BASE);
|
||||
RTC_HAL_Init(RTC_BASE);
|
||||
|
||||
// select RTC clock source
|
||||
|
@ -46,7 +47,7 @@ void rtc_free(void) {
|
|||
* 0 = Disabled, 1 = Enabled
|
||||
*/
|
||||
int rtc_isenabled(void) {
|
||||
SIM_HAL_EnableRtcClock(RTC_BASE, 0U);
|
||||
SIM_HAL_EnableRtcClock(SIM_BASE, 0U);
|
||||
return (int)RTC_HAL_IsCounterEnabled(RTC_BASE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue