Skip to main content
TDJ
Senior III
September 1, 2026
Question

CubeMX RTC config issues (2)

Hi ST,

Is the issue with generated code resetting RTC clock described here
CubeMX RTC config issues | Community (Internal ticket number: 200239)
going to be fixed?

Thanks,

Thomas

1 reply

TDJ
TDJAuthor
Senior III
September 1, 2026

Just to clarify, all that is needed is an additional “USER CODE” section right after the date/time is set. This would allow users to add custom code that can bypass the date/time setup. Currently, this is simply not possible because there is no “USER CODE” section between setting the date/time and configuring the RTC alarm.

The required change is very small, straightforward, and non-breaking. Please see the proposed solution below, which introduces a new Check_RTC_SetDateTime section.