2018-09-06 07:55 PM
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
2018-09-06 11:06 PM
Actually you are right, but there is only one RTC in the STM32L4. So it's not that critical.
2018-09-07 10:18 AM
What do you mean by “critical�?? It doesn’t compile. Isn’t that critical?
2018-09-07 12:57 PM
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
2019-10-18 03:04 PM
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.