Skip to main content
HermannKleier
Associate III
September 7, 2018
Question

Typo in LL_RTC_ALMB_SetDay()

  • September 7, 2018
  • 4 replies
  • 1077 views

As of STM32Cube_FW_L4_V1.12.0, LL_RTC_ALMB_SetDay() reads:

__STATIC_INLINE void LL_RTC_ALMB_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
{
 MODIFY_REG(RTC->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU),
 (((Day & 0xF0U) << (RTC_ALRMBR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMBR_DU_Pos)));
}

However, the first argument of MODIFY_REG shall read

RTCx->ALRMBR

This topic has been closed for replies.

4 replies

Roman Jasmann
Associate II
September 7, 2018

Actually you are right, but there is only one RTC in the STM32L4. So it's not that critical.

HermannKleier
Associate III
September 7, 2018

What do you mean by “critical�?? It doesn’t compile. Isn’t that critical?

waclawek.jan
Super User
September 7, 2018

Now that's strange - RTC is defined in the device header (stm32l4NNxx.h) which is included into stm32l4xx.h, that's included into stm32l4xx_ll_rtc.h where the above function is defined.

While IMO the bug *is* a bug, that your code does not compile might have some different reason. Can you please give us more details, e.g the exact error message and the circumstances of compilation?

JW

HermannKleier
Associate III
October 18, 2019

It’s been more than a year ago. We have see two updates and today 1.14 is the current version. Nothing has changed. Still the documentation (UM 1884) states that the parameter RTCx is an RTC Instance. And still the implementation silently ignores the parameter and uses the global variable RTC instead.