STMicroelectronics / STM32CubeU0

STM32Cube MCU Full Package for the STM32U0 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST)
https://www.st.com/en/embedded-software/stm32cubeu0.html
Other
0 stars 0 forks source link

stm32u0xx_hal_rtc_ex.h: #define RTC_BKP_NB inconssitency to DS14581 - Rev 2 #4

Open ChristianGrau5452 opened 2 weeks ago

ChristianGrau5452 commented 2 weeks ago

Dear all

The datasheet DS14581 - Rev 2 in chapter "Real-time clock (RTC), tamper (TAMP) and backup registers" states that the RTC has 20 bytes of user application data.

This seems inconsissten to the cube code in stm32u0xx_hal_rtc_ex.h: where #define RTC_BKP_NB is 9U.

What is correct?

Thank you for the clarification and kind regards

Christian

ALABSTM commented 2 weeks ago

Hi @ChristianGrau5452,

In DS14581 you referenced, but also in DS14548, it is clearly written:

Hence, there is no inconsistency from the driver's side. However, I agree this mention of "keeping 20 bytes of user application data" is quite puzzling.

I'll dig deeper and let you know once I have something.

With regards,

ALABSTM commented 1 week ago

ST Internal Reference: 184761

ALABSTM commented 1 week ago

Hi @ChristianGrau5452,

Looks like you are right and your point is valid. May apologies. There is indeed a discrepancy. The fix is likely to impact both the datasheet and the firmware. To be continued...

With regards,