cancel
Showing results for 
Search instead for 
Did you mean: 

does STM32U5A9J-DK support HAL_RCCEx_OCTOSPIDelayConfig for Octo-SPI PSRAM?

JKim.2
Senior

Hello,

 

I configured the STM32CubeIDE project and codes for the Octo-SPI PSRAM according to the AN5050.  However, the compilation was failed with below messages. The HAL_RCCEx_OCTOSPIDelayConfig is not available in STM32CubeU5 HAL driver. How can I solve this problem? 

To avoid the compilation error, the DelayBlock_Calibration was removed temporarily. The addressing of Octo-SPI PSRAM has an error at OCTOSOP1_BASE 0x90000000 as below. Why the default base address is not responding?

Thanks.

target_is_not_reaching_debug.PNG

arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32U5A9xx -c -I../Core/Inc -I../Drivers/STM32U5xx_HAL_Driver/Inc -I../Drivers/STM32U5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32U5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"

arm-none-eabi-gcc "../Core/Src/stm32u5xx_hal_msp.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32U5A9xx -c -I../Core/Inc -I../Drivers/STM32U5xx_HAL_Driver/Inc -I../Drivers/STM32U5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32U5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/stm32u5xx_hal_msp.d" -MT"Core/Src/stm32u5xx_hal_msp.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/stm32u5xx_hal_msp.o"

../Core/Src/main.c: In function 'DelayBlock_Calibration':

../Core/Src/main.c:827:17: warning: implicit declaration of function 'HAL_RCCEx_OCTOSPIDelayConfig'; did you mean 'HAL_RCCEx_CRSConfig'? [-Wimplicit-function-declaration]

827 | HAL_RCCEx_OCTOSPIDelayConfig(delay, 0);

| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

| HAL_RCCEx_CRSConfig

arm-none-eabi-gcc "../Core/Src/stm32u5xx_it.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32U5A9xx -c -I../Core/Inc -I../Drivers/STM32U5xx_HAL_Driver/Inc -I../Drivers/STM32U5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32U5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/stm32u5xx_it.d" -MT"Core/Src/stm32u5xx_it.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/stm32u5xx_it.o"

arm-none-eabi-gcc "../Core/Src/system_stm32u5xx.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32U5A9xx -c -I../Core/Inc -I../Drivers/STM32U5xx_HAL_Driver/Inc -I../Drivers/STM32U5xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32U5xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/system_stm32u5xx.d" -MT"Core/Src/system_stm32u5xx.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/system_stm32u5xx.o"

arm-none-eabi-gcc -o "STM32U5A9J-DK-OctalRAM.elf" @"objects.list" -mcpu=cortex-m33 -T"C:\Users\jekim\STM32CubeIDE\workspace_1.17.0\STM32U5A9J-DK-OctalRAM\STM32U5A9NJHXQ_FLASH.ld" --specs=nosys.specs -Wl,-Map="STM32U5A9J-DK-OctalRAM.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/main.o: in function `DelayBlock_Calibration':

C:/Users/jekim/STM32CubeIDE/workspace_1.17.0/STM32U5A9J-DK-OctalRAM/Debug/../Core/Src/main.c:827: undefined reference to `HAL_RCCEx_OCTOSPIDelayConfig'

C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.1.0.202410251130/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/jekim/STM32CubeIDE/workspace_1.17.0/STM32U5A9J-DK-OctalRAM/Debug/../Core/Src/main.c:890: undefined reference to `HAL_RCCEx_OCTOSPIDelayConfig'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:64: STM32U5A9J-DK-OctalRAM.elf] Error 1

"make -j8 all" terminated with exit code 2. Build might be incomplete.

 

10:00:19 Build Failed. 3 errors, 1 warnings. (took 4s.173ms)

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @JKim.2;

 

The AN5050 "Getting started with Octo-SPI, Hexadeca-SPI, and XSPI interfaces on STM32 MCUs" describes the OCTOSPI, HSPI, and XSPI peripherals in STM32 MCUs and explains how to configure them in order to write and read external Octo-SPI/16-bit, HyperBus™ and regular protocol memories.

But I confirm that there are no HSPI examples in AN5050.

I recommend you the BSP example. This example shows how to erase, write and read data available on the HexaDecaSPI ram memory available on the board. Frequency 80Mhz for STM32U5G9xx and STM32U5A9xx ==> Result shown on Terminal I/O.

I hope this help you.

Please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you.

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.

View solution in original post

7 REPLIES 7
KDJEM.1
ST Employee

Hello @JKim.2;

The example provided in AN5050 is developed with STM32L4P5G-DK Discovery kit. The delay block in STM32L5 and STM32L4+ is different from the one in STM32H7, U5, and H5 products. In STM32L5 and STM32L4+, the delay block is a feature provided to the OCTOSPI interface, where unitary delays can be configured using the OCTOSPIx_DLY field in the RCC_DLYCFGR register. Conversely, in STM32H7, U5, and H5 products, the delay block is an independent peripheral that can be configured for the Octo-SPI interface. 

For the delay block configuration with STM32U5, I recommend to take a look at these examples and get inspired to configure the delay block with STM32U5 devices:

I hope this help you.

Thank you.

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.

Hello @KDJEM.1 ,

 

Thank you for the information. Btw, could you also answer for the problem with the OCTOSPI1_BASE address?

 

Thanks.

KDJEM.1
ST Employee

Hello @JKim.2,

 

For STM32U5A9J-DK board, the PSRAM is connected to HSPI1 interface not to OCTOSPI1 interface, as mentioned in the schematic and user manual of board.

KDJEM1_1-1741942040631.png

 

KDJEM1_0-1741941981780.png

 

 The HSP1 addressable space is from 0xA000 0000 to 0xAFFF FFFF not 0x9000 0000 to 0x9FFF FFFF.

 

Thank you.

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.

Hello @KDJEM.1 ,

 

Thank you for the correction. Btw, AN5050 is based on OCTOSPI. Can I have any other reference guidance for the HSPI1 with OctoSPI PSRAM?

 

Thanks.

KDJEM.1
ST Employee

Hello @JKim.2;

 

The AN5050 "Getting started with Octo-SPI, Hexadeca-SPI, and XSPI interfaces on STM32 MCUs" describes the OCTOSPI, HSPI, and XSPI peripherals in STM32 MCUs and explains how to configure them in order to write and read external Octo-SPI/16-bit, HyperBus™ and regular protocol memories.

But I confirm that there are no HSPI examples in AN5050.

I recommend you the BSP example. This example shows how to erase, write and read data available on the HexaDecaSPI ram memory available on the board. Frequency 80Mhz for STM32U5G9xx and STM32U5A9xx ==> Result shown on Terminal I/O.

I hope this help you.

Please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you.

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.

Hello @KDJEM.1 ,

 

The main.h file includes many other header files including stm32u5x9j_discovery_hspi.h but they are not found. How to get them and successfully complete compilation?

STM32CubeU5/Projects/STM32U5x9J-DK/Examples/BSP/Inc/main.h at main · STMicroelectronics/STM32CubeU5 · GitHub

#include "stm32u5x9j_discovery.h"
#include "stm32u5x9j_discovery_conf.h"
#include "stm32u5x9j_discovery_ospi.h"
#include "stm32u5x9j_discovery_lcd.h"
#include "stm32u5x9j_discovery_ts.h"
#include "stm32u5x9j_discovery_hspi.h"
#include "stm32u5x9j_discovery_mmc.h"
#include "stm32u5x9j_discovery_ranging_sensor.h"
#include "stm32u5x9j_discovery_env_sensors.h"

#include "stm32_lcd.h"

 

Thanks.

KDJEM.1
ST Employee

Hello @JKim.2;

 

Are you having a compilation error? If yes, please create a new message with a description of the problem.

You can find these header files in \STM32Cube\Repository\STM32Cube_FW_U5_V1.7.0\Drivers\BSP\STM32U5x9J-DK (GitHub - STMicroelectronics/stm32u5x9j-dk-bsp at a5723a4ff404cb659b3c095d59527a0b0c2062f0)

KDJEM1_3-1741950641264.png

 

To, open BSP example, please follow these steps:

KDJEM1_0-1741950443754.png

KDJEM1_2-1741950574992.png

 

 

I hope this help you.

Thank you.

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.