cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 RTC Backup registers are limited to 5 on STM32L151RBT6A device

SChin.4
Associate II

We are using STM32L151RBT6A device. As per the specification we should be able to have access to 80bytes of RTC backup memory , but we are able to access only 20bytes of Backup registers memory. As per RTC backup registers description , for value line devices only 20bytes of backup memory is available. Does this STM32L151RBT6A micro come under value line devices ? when we read using debugger , we see the DBGMCU ID register is showing the category as Cat 2 and Rev Y. So, we do not understand why only 20bytes of backup memory is available on this micro.

8 REPLIES 8
Peter BENSCH
ST Employee

How did you check that it should be 20 bytes?

Presumably you found 20 registers, each of which is 32 bits wide, i.e. consists of 4 bytes?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
SChin.4
Associate II

In the debugger , we see 20 registers each of 32bits width. But when we are trying to write , we are only able to write the first 5 registers. not all the 20 registers. so, we see that only 20bytes of memory is available , not 80 bytes.

SChin.4
Associate II

0693W00000NqZ57QAF.png

Peter BENSCH
ST Employee

Correct: STM32L151RBT6A is a Cat.2 component, as you can find in RM0038 on page 40. In this respect, it belongs to the so-called value line devices and accordingly has only 5 20 registers = 20 80 bytes.

[edit: see other comments below]

Does it answer your question?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
SChin.4
Associate II

How are we categorizing this part as value line device. I couldn't find the reference or information on why this part is under value line devices category. In the link that you provided in above reply for this part STM32L151RBT6A also mentions that 80bytes of backup memory. I thought only the L100 series is the value line devices series.

SChin.4
Associate II

We use STM32L151V series micro in other projects. That does have 80bytes of backup memory, as shown in the table that is a cat 3 device. Coming from the same series , why is this STM32L151V is not a value line device ? May be i am missing some basic understanding on what is value line device.

Peter BENSCH
ST Employee

Oops, I had answered too quickly and not correctly. Value Line Devices are defined a little differently in all families, but you are right, for the STM32L1 these are the STM32L100, as can be seen on the website, for example. The STM32L151RB-A are Cat.2 and STM32L151V are Cat.3 and Cat.4 respectively.

In this respect, your assumption that the STM32L151RBT6A has 80 bytes = 20 registers is correct, as it is also stated in RM0038, section 5.1.3.

Now you have to find out why you can only address a part of the registers. Unfortunately, I don't have any hardware with a Cat.2 device (DISCOVERY and NUCLEO are only available with L151RC=Cat.3 and L151RE=Cat.5), so I can't test it directly. Possibly it is an access problem, because the write protection must first be removed from the backup registers (see e.g. section 5.1.3, RTC registers access, page 100).

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
SChin.4
Associate II

Yes , the only question is why this STM32L151RB-A part is only 5 backup registers as writable. As I mentioned, we are able to write 5 registers (20 bytes). So, I do not doubt on the write protection setup. though the part number on package shows as STM32L151RBT6A , its behaving as STM32L100 series.