Skip to content

drivers: flash_stm32h7: partition check issue #90252

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

Closed
pillo79 opened this issue May 21, 2025 · 0 comments · Fixed by #90254
Closed

drivers: flash_stm32h7: partition check issue #90252

pillo79 opened this issue May 21, 2025 · 0 comments · Fixed by #90254
Labels
area: Flash bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32

Comments

@pillo79
Copy link
Collaborator

pillo79 commented May 21, 2025

Describe the bug

On STM32H747xI, partitions defined close to the end of the first Flash bank are causing runtime errors like the following:

*** Booting Zephyr OS build v3.7.0-16360-gd851814b6c4d ***
[00:00:00.207,000] <err> flash_stm32h7: Range ovelaps flash bank discontinuity

as reported in arduino/ArduinoCore-zephyr#125 (comment) .

To Reproduce

The partition that is causing the error is defined by this DTS snippet:

&flash0 {
        partitions {
                user_sketch: partition@e0000 {
                        reg = <0x0e0000 0x20000>;
                };
        };
};

(it's in the last 128k of Flash bank 0).

Trying to read from this on an arduino_giga_r1//m7 or another H7 target should error at runtime.

Expected behavior

The partition should be accessed with no errors, as it was happening before commit 0e41b07.
The problem with that change is that it replaces the total size on chip with the bank size, which is half of the total on dual bank devices; this invalid value causes later safety checks to trip unnecessarily.

PR incoming.

Impact
Depends on user partitioning; in Arduino it blocks the loader from working on H7 targets (Giga, Portenta H7, Opta).

Additional context

Tested with recent main (649eb62).

@pillo79 pillo79 added bug The issue is a bug, or the PR is fixing a bug area: Flash platform: STM32 ST Micro STM32 labels May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Flash bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant