Skip to content

hal/stm32n6: initialize dtcm#427

Merged
jakubsmolaga merged 1 commit into
masterfrom
jakubsmolaga/stm32n6-dtcm-init
May 8, 2026
Merged

hal/stm32n6: initialize dtcm#427
jakubsmolaga merged 1 commit into
masterfrom
jakubsmolaga/stm32n6-dtcm-init

Conversation

@jakubsmolaga
Copy link
Copy Markdown
Contributor

TASK: PP-473

Description

This change initializes DTCM memory during startup of armv8m55-stm32n6

Motivation and Context

This change is required to allow moving kernel data to DTCM, which has great performance benefits. The DTCM memory needs to be fully cleared before it can be used because otherwise access causes bus faults due to ECC errors.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: armv8m55-stm32n6.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces DTCM initialization for the STM32N6 platform by adding a memory zeroing loop. The reviewer suggests replacing hardcoded magic numbers for the DTCM base address and bank size with configurable macros to improve maintainability. Additionally, it is recommended to use the volatile qualifier in the initialization loop to prevent compiler optimizations that could interfere with correct ECC initialization.

Comment thread hal/armv8m/stm32/n6/stm32n6.c Outdated
Comment thread hal/armv8m/stm32/n6/stm32n6.c
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Unit Test Results

10 543 tests  ±0   9 881 ✅ ±0   52m 34s ⏱️ -35s
   649 suites ±0     662 💤 ±0 
     1 files   ±0       0 ❌ ±0 

Results for commit 48ba7a4. ± Comparison against base commit 0e54005.

♻️ This comment has been updated with latest results.

Comment thread hal/armv8m/stm32/n6/stm32n6.c
@jakubsmolaga jakubsmolaga force-pushed the jakubsmolaga/stm32n6-dtcm-init branch 3 times, most recently from c577c60 to ff0e3d8 Compare May 8, 2026 13:25
@jakubsmolaga jakubsmolaga force-pushed the jakubsmolaga/stm32n6-dtcm-init branch from ff0e3d8 to 48ba7a4 Compare May 8, 2026 13:30
@jakubsmolaga jakubsmolaga marked this pull request as ready for review May 8, 2026 13:37
@jakubsmolaga jakubsmolaga merged commit bf5313f into master May 8, 2026
47 checks passed
@jakubsmolaga jakubsmolaga deleted the jakubsmolaga/stm32n6-dtcm-init branch May 8, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants