cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in RTC CubeMX code generate

EDuat.1
Associate III
static void MX_RTC_Init(void)
 
{
 
 
 
 /* USER CODE BEGIN RTC_Init 0 */
 
 
 
 /* USER CODE END RTC_Init 0 */
 
 
 
 LL_RTC_InitTypeDef RTC_InitStruct = {0};
 
 LL_RTC_TimeTypeDef RTC_TimeStruct = {0};
 
 LL_RTC_DateTypeDef RTC_DateStruct = {0};
 
 
 
 /* Peripheral clock enable */
 
 LL_RCC_EnableRTC();
 
 
 
 /* USER CODE BEGIN RTC_Init 1 */
 
 
 
 /* USER CODE END RTC_Init 1 */
 
 /** Initialize RTC and set the Time and Date
 
 */
 
 RTC_InitStruct.HourFormat = LL_RTC_HOURFORMAT_24HOUR;
 
 RTC_InitStruct.AsynchPrescaler = 36;
 
 RTC_InitStruct.SynchPrescaler = 999;
 
 LL_RTC_Init(RTC, &RTC_InitStruct);
 
 /** Initialize RTC and set the Time and Date
 
 */
 
 RTC_TimeStruct.Hours = 15;
 
 RTC_TimeStruct.Minutes = 19;
 
 RTC_TimeStruct.Seconds = 0;
 
 LL_RTC_TIME_Init(RTC, LL_RTC_FORMAT_BCD, &RTC_TimeStruct);
 
 RTC_DateStruct.WeekDay = LL_RTC_WEEKDAY_MONDAY;
 
 RTC_DateStruct.Month = LL_RTC_MONTH_JANUARY;
 
 RTC_DateStruct.Year = 20;
 
 //RTC_DateStruct.Day = 15;
 
 LL_RTC_DATE_Init(RTC, LL_RTC_FORMAT_BCD, &RTC_DateStruct);
 
 /* USER CODE BEGIN RTC_Init 2 */
 
 
 
 /* USER CODE END RTC_Init 2 */
 
 
 
}

RTC_DateStruct.Day = 0; line is lost.Cube doesnt generate this line.

1 ACCEPTED SOLUTION

Accepted Solutions

Dear @Community member​ ,

Thank you for your feedback.

This was internally checked and it will be fixed as soon as possible.

Thank you !

View solution in original post

4 REPLIES 4
Houssem CHAABANI
Senior II

Hi @Community member​ ,

Could you share you .ioc file?

Thanks

Houssem

EDuat.1
Associate III

ofcourse

Dear @Community member​ ,

Thank you for your feedback.

This was internally checked and it will be fixed as soon as possible.

Thank you !

EDuat.1
Associate III

By the way,low layer library gettin bcd result doesnt work ,still produce binary result.This takes time almost half day to realise it.