Skip to content

rtc.isTimeSet() returns true if RTC backup registers are used even if time was not set #123

@ndoo

Description

@ndoo

Describe the bug
rtc.isTimeSet() returns true if RTC backup registers are used even if time was not set.

I suspect the re-entrant/reinit check needs to be tightened up.

To Reproduce

  1. HAL_PWR_EnableBkUpAccess();
  2. HAL_RTCEx_BKUPWrite(rtc.getHandle(), 0, 0xFFFF);
  3. rtc.isTimeSet() returns true after this

Expected behavior
rtc.isTimeSet() should return false

Screenshots

Desktop (please complete the following information):

  • STM32 core version: 2.12.0
  • Library version: 1.8.0
  • Tools menu settings if not the default: -
  • Upload method: USB DFU

Hardware (please complete the following information):

  • Board Name: Custom STM32U073CC
  • Hardware Revision: -
  • Extra hardware used if any: -

Additional context
Add any other context about the problem here.

We are using RTC backup registers to store stateful information.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions