Skip to main content
Mna.1
Associate III
September 28, 2020
Question

Backup register of STM32L010F4

  • September 28, 2020
  • 8 replies
  • 2239 views

Thank you for helping.

How do I back up the registers when the power is turned off without the VBAT pin?

Thank you.

This topic has been closed for replies.

8 replies

Tesla DeLorean
Guru
September 29, 2020

You should have 128 bytes of data EEPROM, use that.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Mna.1
Mna.1Author
Associate III
September 30, 2020

Hi clive1

Does that mean that the backup register written in the data sheet cannot be used?

Tesla DeLorean
Guru
September 30, 2020

>>Does that mean that the backup register written in the data sheet cannot be used?

Those are RAM cells, they'd need to draw power from somewhere. Perhaps I misunderstood your scenario..

EEPROM would be appropriate for situation where power is entirely absent.

https://www.st.com/en/microcontrollers-microprocessors/stm32l010f4.html

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
waclawek.jan
Super User
September 30, 2020

Try to describe your problem in more details, using names of registers used in the Manuals.

JW

Mna.1
Mna.1Author
Associate III
October 1, 2020

Thank you for your reply.

RTC backup registers (RTC_BKPxR)

I understand that the backup register of a microcomputer with a VBAT terminal retains its value even if the power is turned off if there is a voltage in VBAT.

However, this microcomputer does not have a VBAT terminal. Therefore, I think that the value cannot be retained when the power is turned off.

Why is it named backup?

I do not understand.

Mna.1
Mna.1Author
Associate III
October 1, 2020

I want to confirm one more thing.

I think that the RTC of a microcomputer without a VBAT terminal is useless.

Is the time set every time the power is turned off and then on again?

I have never seen such a device.

Tesla DeLorean
Guru
October 1, 2020

Ok, so the L series devices are designed to be powered by a battery, you use software to put them in STANDBY and they draw the current of an RTC.

You need to design an external circuit​ to maintain power if you have multiple power sources like two batteries, or a primary/secondary supply. You recognize your primary supply, say USB charger, vanishes and you go into STANDBY ASAP.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Mna.1
Mna.1Author
Associate III
October 1, 2020

Mr. clive1 Thank you for your reply.

With that in mind, the backup register itself becomes meaningless.

This is because things other than the backup register are also backed up.

What do you think?

Tesla DeLorean
Guru
October 2, 2020

What do I think about what?

That you've got an RTC with 20-bytes of backup registers to hold state, and restart in the future. That if you need to hold more the 20 bytes upto 128, and across a total loss of power (battery change) there is EEPROM, and beyond that FLASH.

With a low cost, mass market, general purpose low power MCU, you get to live with other people's priorities and compromises. You can find alternatives that suit you better, or you can create your own perfect custom design, with all the costs, time, frustrations and disappointments that come with that.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Mna.1
Mna.1Author
Associate III
October 5, 2020

clive1

Thank you for your reply.

There was an answer in the following article.

" RTC backup registers after power off and on "

The backup register for devices without a VBAT pin doesn't seem to make sense.

Tesla DeLorean
Guru
October 5, 2020

Yes you keep going to that, but when the primary supply is the battery it doesn't make sense to have a second pin.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Uwe Bonnes
Chief
October 5, 2020

There are ST supply schematics for STM32L parts that cope with the missing VBAT pin. Look deeper.