cancel
Showing results for 
Search instead for 
Did you mean: 

Fx_NoR_Write_Read_File example for STM32U5x9J-DK

efekete
Associate

The example does not work. It times out:

Stack:

HAL_OSPI_AutoPolling() at stm32u5xx_hal_ospi.c:1,831 0x80042e8
ospi_memory_reset() at lx_stm32_ospi_driver_glue.c:560 0x8001afe
lx_stm32_ospi_lowlevel_init() at lx_stm32_ospi_driver_glue.c:79 0x800165a
lx_stm32_ospi_initialize() at lx_stm32_ospi_driver.c:61 0x80166ea
_lx_nor_flash_open() at lx_nor_flash_open.c:128 0x8015822
fx_stm32_levelx_nor_driver() at fx_stm32_levelx_nor_driver.c:111 0x8014758
_fx_media_format() at fx_media_format.c:177 0x8010a26
_fxe_media_format() at fxe_media_format.c:114 0x80144b8
fx_app_thread_entry() at app_filex.c:156 0x8001464
_tx_thread_shell_entry() at tx_thread_shell_entry.c:114 0x8018388

Other relevant info:

Board: MB1829 Discovery kit with STM32U5A9NJ MCU

Environment: STM32CubeIDE

Component: MX25UM51245GXDI00 Macronix OctaFlash

2 REPLIES 2

Perhaps a problem at the pin or peripheral level?

Would suggest finding some simpler OSPI examples, and debugging the BSP functionality, either confirming those work, or the specific issues with it.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KDJEM.1
ST Employee

Hello @efekete ,

Besides the @Tesla DeLorean proposal, I advise you to check the recommendation mentioned in Readme such as, for STM32CubeIDE add the following section into the .ld file:

._threadx_heap :
  {
     . = ALIGN(8);
     __RAM_segment_used_end__ = .;
     . = . + 64K;
     . = ALIGN(8);
   } >RAM_D1 AT> RAM_D1
The ._threadx_heap must be located between the .bss and the ._user_heap_stack sections in the linker script. Caution: Make sure that ThreadX does not need more than the provided heap memory (64KBytes in this example). Also, the "tx_initialize_low_level.S" should be also modified to enable the "USE_DYNAMIC_MEMORY_ALLOCATION" flag.
I think that an OSPI_NOR_MemoryMapped example can help you.
I hope this help you!
Thank you for your contribution in STCommunity :).
Kaouthar 
 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.