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

RAM retention not working on NXP S32K3 #75912

Closed
manuargue opened this issue Jul 16, 2024 · 0 comments · Fixed by #75913
Closed

RAM retention not working on NXP S32K3 #75912

manuargue opened this issue Jul 16, 2024 · 0 comments · Fixed by #75913
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP S32 NXP Semiconductors, S32 priority: low Low impact/importance bug

Comments

@manuargue
Copy link
Member

manuargue commented Jul 16, 2024

Describe the bug
S32K3 devices allow to retain SRAM contents through a hw mechanism but currently the SRAM contents are always being zero-initialized at boot time to prevent ECC errors for occurring: https://github.com/zephyrproject-rtos/zephyr/blob/main/soc/nxp/s32/s32k3/s32k3xx_startup.S

To Reproduce

  1. write data in SRAM after booting the device
  2. issue a functional reset (e.g. watchdog expires - not currently supported in main branch)
  3. read previous data from SRAM after booting the device - contents are cleared.

Expected behavior
SRAM contents are retained across functional resets and ECC initialization is only performed if coming from a destructive reset (e.g. PoR).

Impact
defective functionality

Environment (please complete the following information):

  • OS: Linux
  • Toolchain Zephyr SDK
  • d2a4522

Additional context
NA

@manuargue manuargue added bug The issue is a bug, or the PR is fixing a bug platform: NXP S32 NXP Semiconductors, S32 labels Jul 16, 2024
@manuargue manuargue self-assigned this Jul 16, 2024
manuargue added a commit to manuargue/zephyr that referenced this issue Jul 16, 2024
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.

Fixes zephyrproject-rtos#75912

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
manuargue added a commit to manuargue/zephyr that referenced this issue Jul 16, 2024
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.

Fixes zephyrproject-rtos#75912

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
@nashif nashif added the priority: low Low impact/importance bug label Jul 16, 2024
@nashif nashif closed this as completed in ec72890 Jul 27, 2024
zephyrbot pushed a commit that referenced this issue Jul 27, 2024
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.

Fixes #75912

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
(cherry picked from commit ec72890)
dleach02 pushed a commit that referenced this issue Aug 3, 2024
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.

Fixes #75912

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
(cherry picked from commit ec72890)
Chenhongren pushed a commit to Chenhongren/zephyr that referenced this issue Aug 26, 2024
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.

Fixes zephyrproject-rtos#75912

(cherry picked from commit ec72890)

Original-Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
GitOrigin-RevId: ec72890
Change-Id: Ibef5fcad26770af63c8ee50eda9184c50aa288f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5745530
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
topisani pushed a commit to topisani/zephyr that referenced this issue Aug 28, 2024
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.

Fixes zephyrproject-rtos#75912

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
(cherry picked from commit ec72890)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP S32 NXP Semiconductors, S32 priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants