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

Sporadic kernel panics on stm32g4 flash erase/writes #32221

Closed
alexanderwachter opened this issue Feb 11, 2021 · 3 comments · Fixed by #32218
Closed

Sporadic kernel panics on stm32g4 flash erase/writes #32221

alexanderwachter opened this issue Feb 11, 2021 · 3 comments · Fixed by #32218
Assignees
Labels
area: Flash bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 priority: low Low impact/importance bug

Comments

@alexanderwachter
Copy link
Member

Describe the bug
When writing big data chunks to the flash of an STM32G4 SoC, sporadic kernel panics occur.
It seems that a cache flush is needed after each erase.

To Reproduce
Build mcuboot for the nucleo_g474re and update several times.
Sometimes you will see a panic.

Expected behavior
Flash write and erase should work without panic

Impact
Firmware updates on stm32g4 series do not work

Logs and console output

E: ***** BUS FAULT *****
E:   Precise data bus error
E:   BFAR Address: 0xfab1f1a4
E: r0/a1:  0x0000045d  r1/a2:  0x00000000  r2/a3:  0xfab1f1a4
E: r3/a4:  0x20000208 r12/ip:  0xa0000000 r14/lr:  0x080043e1
E:  xpsr:  0x6100000f
E: Faulting instruction address (r15/pc): 0x08003d6a
E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
E: Fault during interrupt handling
E: Current thread: 0x20000208 (unknown)
E: Halting system
@alexanderwachter alexanderwachter added bug The issue is a bug, or the PR is fixing a bug area: Flash platform: STM32 ST Micro STM32 has-pr labels Feb 11, 2021
@alexanderwachter
Copy link
Member Author

Fix: #32218

@alexanderwachter
Copy link
Member Author

why low @erwango? this affects all stm32g4 users that use the flash driver.

@erwango
Copy link
Member

erwango commented Feb 11, 2021

@alexanderwachter This is from zephyr point of view: one series, one driver, not a regression (from what I saw) and not systematic. But doesn't prevent to review quickly and push so that it's getting merged.

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 priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants