2015-02-17 06:54 AM
There should be a pin out option to select and generate initialization code for just the RTC calendar & clock functions.
Cheers, Hal2015-02-21 08:49 AM
Hi, hal,
Is it a suggestion?I have a problem in RTC code generated by CubeMx.The RTC function can run, but can not to set date and time.It always run the initial value. The RTC_TR register can not modify. I had disable the write protection before modify the valve of rtc register. But it not work. /* Disable the write protection for RTC registers */ __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); Is there has reference code to wrok?Thank you.Kevin2015-02-26 08:56 AM
Yes, it is a suggestion. I expected a response from ST of yes, no, or how to do it, but no response so far.
The time and calendar setting code provided in the Cube MX initialization is just an example of how to do it. The processor does not know the time and date at run time, so you have to develop some function, such as an RS-232 link to a PC, to provide the correct setting. Cheers, Hal2015-03-05 02:40 AM
Hello Hal,
By selecting the option ''Generate peripheral initialization as a pair of .c/.h files'' under Project > Project Settings > Code Generator tab, you will be able to retrieve the RTC init code in a dedicated file. Regarding RCC configuration, it is always available in the main.c via the SystemClock_Config function.2015-03-05 06:13 AM
Thank You. Hal
2015-07-22 04:03 AM
Hi,
I think what Hal meant was that there was no way of including astraightforward
RTC IP in the design without alarm, wakeup, calibration, route and ref. clock detection options. An RTC only for time and calender... Emre2015-07-28 05:45 AM
I think we are talking about 2 issues:
1. RTC IP can't be activated without TAMPER pin assignment. Without activation, it is not possible to assign external LSE clock for RTC. Also we can't use RTC in manual programming mode without changing SystemClock_Config code.2. There is no option to disable setting default date time when VBAT (backup battery) is used.Community proposes making some fixes to CubeMX to resolve these issues.2015-07-28 05:46 AM
I think we are talking about 2 issues:
1. RTC IP can't be activated without TAMPER pin assignment. Without activation, it is not possible to assign external LSE clock for RTC. Also we can't use RTC in manual programming mode without changing SystemClock_Config code.2. There is no option to disable setting default date time when VBAT (backup battery) is used.Community proposes making some fixes to CubeMX to resolve these issues.2015-08-04 04:57 AM
Hi isaev.michael,
Concerning the first issue. If you enable the LSE clock under RCC peripheral through Pinout view, LSE can be the RTC clock without activation of the Tamper. -Shahrzad-