Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stm32H5: Add backup sram on additional SOCs #77712

Merged
merged 3 commits into from
Sep 2, 2024

Conversation

str4t0m
Copy link
Collaborator

@str4t0m str4t0m commented Aug 28, 2024

The backup SRAM is available on all STM32H5 SOCs, therefore this PR adds the definition for all SOCs.
Additionally:

  • Update Documentation for related nucleo boards
  • Update the related sample to store a magic value next to the counter.
    The magic should be good enough for such a sample and doesn't add any dependencies, but please let me know if you'd prefer to use a crc instead of the magic value.

samples/boards/stm32/backup_sram/src/main.c Outdated Show resolved Hide resolved
samples/boards/stm32/backup_sram/src/main.c Show resolved Hide resolved
boards/st/nucleo_h503rb/doc/index.rst Outdated Show resolved Hide resolved
boards/st/nucleo_h533re/doc/index.rst Outdated Show resolved Hide resolved
boards/st/nucleo_h563zi/doc/index.rst Outdated Show resolved Hide resolved
Copy link
Collaborator

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I don't think there is a need for anything stronger than the magic value.

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @str4t0m

This commit moves the backup sram definition to the
series base dtsi file, the size is overwritten for socs
which have a bigger bkpsram.

The backup SRAM is available on all stm32h5 mcus.
stm32h503/523/533 have 2k
stm32h562/563/573 have 4k

Signed-off-by: Thomas Stranger <[email protected]>
Mark backup sram as supported and document it.

Signed-off-by: Thomas Stranger <[email protected]>
Stores a magic value togetter with the counter value, and resets the
counter in case that magic does not match.
A small magic value is not ideal, but should be good enough for the
sample and avoids pulling in a additional dependency e.g. on crc.

Signed-off-by: Thomas Stranger <[email protected]>
@aescolar aescolar merged commit d09e1d6 into zephyrproject-rtos:main Sep 2, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Samples Samples platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants