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

stm32H7 cannot XiP from dual quad nor in Memorymapped mode #73025

Open
FRASTM opened this issue May 20, 2024 · 1 comment · May be fixed by #73027
Open

stm32H7 cannot XiP from dual quad nor in Memorymapped mode #73025

FRASTM opened this issue May 20, 2024 · 1 comment · May be fixed by #73027
Assignees
Labels
area: QSPI Quad SPI 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

@FRASTM
Copy link
Collaborator

FRASTM commented May 20, 2024

When executing the samples/application_development/code_relocation_nocopy/ on the stm32h745i_disco//m7 disco kit,
the function_in_ext_flash cannot execute correctly fro theexternal NOR flash

The external NOR flash is configured in memoryMapped mode with
CONFIG_STM32_MEMMAP=y

The samples/application_development/code_relocation_nocopy/ is build with quadspi memory region set at 0x90000000
The function_in_ext_flash is downloaded in ext flash, but execution fails

*** Booting Zephyr OS build v3.6.0-4147-gadeb19b30cbf ***                                     
Address of main function 0x800066d                                                            
[00:00:00.000,000] <err> os: ***** BUS FAULT *****                                            
[00:00:00.000,000] <err> os:   Instruction bus error                                          
[00:00:00.000,000] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000000  r2/a3:  0x00000004       
[00:00:00.000,000] <err> os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x08000681       
[00:00:00.000,000] <err> os:  xpsr:  0x61000000                                               
[00:00:00.000,000] <err> os: Faulting instruction address (r15/pc): 0x90000000                
[00:00:00.000,000] <err> os: >>> ZEPHYR FATAL ERROR 27: Unknown error on CPU 0                
[00:00:00.000,000] <err> os: Current thread: 0x24000800 (unknown)                             
[00:00:00.042,000] <err> os: Halting system     

Environment (please complete the following information):

  • OS: (e.g. Linux, MacOS, Windows) ubuntu
  • Toolchain (e.g Zephyr SDK, ...) 0.16.3
  • Commit SHA or Version used adeb19b
@FRASTM FRASTM added the bug The issue is a bug, or the PR is fixing a bug label May 20, 2024
@FRASTM
Copy link
Collaborator Author

FRASTM commented May 20, 2024

Code is correctly flashed in the external NOR at address 0x90000000
Screenshot from 2024-05-20 15-31-39

On the stm32h745i_disco, the external NOR memory is made of two quad NOR connected to 2 qspi banks
but the stm32 qspi driver does not set the DualFlashMode (DFM) bit in the QUAD_SPI control rgister.

@FRASTM FRASTM added platform: STM32 ST Micro STM32 area: QSPI Quad SPI labels May 21, 2024
@nashif nashif added the priority: low Low impact/importance bug label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: QSPI Quad SPI 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.

3 participants