Fix committed, thanks.
Giovanni
The RTC driver topic
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: The RTC driver topic
Hi Giovanni
I want to change function prototype from
to
to be able to obtain fractional seconds part.
Is it possible in trunk?
I want to change function prototype from
Code: Select all
void rtcConvertDateTimeToStructTm(const RTCDateTime *timespec,
struct tm *timp)
to
Code: Select all
void rtcConvertDateTimeToStructTm(const RTCDateTime *timespec,
struct tm *timp,
uint32_t *tv_msec)
to be able to obtain fractional seconds part.
Is it possible in trunk?
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: The RTC driver topic
Sure go ahead, just make sure both implementations work with the change.
Note that I wish to do a "preview" 3.0 release during the weekend.
Giovanni
Note that I wish to do a "preview" 3.0 release during the weekend.
Giovanni
Re: The RTC driver topic
What the second implementation you talking about? I want to improve just a single function
rtcConvertDateTimeToStructTm from RTC HAL realization.
rtcConvertDateTimeToStructTm from RTC HAL realization.
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
- Chudik
- Posts: 152
- Joined: Fri Jan 16, 2015 7:51 am
- Location: California
- Has thanked: 7 times
- Been thanked: 1 time
Re: The RTC driver topic
Did I understand correctly that this driver does not initialize which clock should be used for the RTC?
STM32L1 family has internal 37kHz generator, I would like to is it instead of the External 32kHz clock
STM32L1 family has internal 37kHz generator, I would like to is it instead of the External 32kHz clock
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
- Chudik
- Posts: 152
- Joined: Fri Jan 16, 2015 7:51 am
- Location: California
- Has thanked: 7 times
- Been thanked: 1 time
Re: The RTC driver topic
Hmm... LSI in mcuconfig.h is enabled by default.
HAL_USE_RTC in halconf.h I set to TRUE
That means RTC should work and rtcInit() should pass, but it does not.
It stops in rtc_lld_init() at calling
If I try to make a step over the function or into it, the system hangs.
What could be the problem?
HAL_USE_RTC in halconf.h I set to TRUE
That means RTC should work and rtcInit() should pass, but it does not.
It stops in rtc_lld_init() at calling
Code: Select all
/* If calendar not init yet. */
if (!(RTC->ISR & RTC_ISR_INITS)){
rtc_lld_enter_init(); // <----------- stops here
....
}
If I try to make a step over the function or into it, the system hangs.
What could be the problem?
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: The RTC driver topic
Probably the oscillator is not starting at all, it is very critical, see application notes.
Giovanni
Giovanni
- Chudik
- Posts: 152
- Joined: Fri Jan 16, 2015 7:51 am
- Location: California
- Has thanked: 7 times
- Been thanked: 1 time
Re: The RTC driver topic
Found what was the problem.
in mcuconf.h by default set
#define STM32_RTCSEL STM32_RTCSEL_LSE
while by default we have
#define STM32_LSI_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
When I changed
#define STM32_RTCSEL STM32_RTCSEL_LSI
RTC initialization went successfully.
Found that after switching from 2.6.7 to 2.6.8, because it gave error that wrong setting used.
Probably would be useful to have
in mcuconf.h by default set
#define STM32_RTCSEL STM32_RTCSEL_LSE
while by default we have
#define STM32_LSI_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
When I changed
#define STM32_RTCSEL STM32_RTCSEL_LSI
RTC initialization went successfully.
Found that after switching from 2.6.7 to 2.6.8, because it gave error that wrong setting used.
Probably would be useful to have
Code: Select all
#if (STM32_LSI_ENABLED)
#define STM32_RTCSEL STM32_RTCSEL_LSI
#elif (STM32_LSE_ENABLED)
#define STM32_RTCSEL STM32_RTCSEL_LSE
#endif
Return to “Development and Feedback”
Who is online
Users browsing this forum: Bing [Bot] and 12 guests