cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7S78-DK Example with both HEXSPI and OCTOSPI running at the same time.

Dub Bartolec
Associate III

Hi All,

I am having difficulties getting both HEXSPI PSRAM (XSPI1) and OCTOSPI (XSPI2) running at the same time in a memory mapped mode on STM32H7S78-DK board.

There are two examples for this board:
XSPI_PSRAM_MemoryMapped that configures XSPI1 in memory mapped mode (access to external RAM)
XSPI_NOR_ReadWhileWrite_DTR that configures XSPI2 in memory mapped mode (access to external FLASH)

Each example runs OK separately. However, when I've ported XSPI1 code from "XSPI_PSRAM_MemoryMapped" project to "XSPI_NOR_ReadWhileWrite_DTR" project PSRAM works in memory mapped mode but external flash doesn't any more.

I am finding that change in HAL_XSPI_MspInit()  that configures XSPI1 breaks operation of XSPI1 in memory mapped mode.

Is there any example source code that work for STM32H7S78-DK board with PSRAM and OCTO FLASH out of the box ?

 

2 REPLIES 2
KDJEM.1
ST Employee

Hello @Dub Bartolec;

 

> PSRAM works in memory mapped mode but external flash doesn't any more.

Could you please give more detail about the issue. What do you mean by external flash doesn't work? Do you get a hardfault or no data transmitted or you received a corrupted data.....?

Are the XSPIs interfaces configured in Multiplexed mode?

Make sure that the data transmission to be completed before switching from memory to another.

 

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.

Hi Kaouthar,

Refer to Schematic for STM32H7S78-DK "mb1763-h7s7I8-d01-schematic.pdf'

On STM32H7S78-DK XSPIs are supposed to be configured as follows:

XSPI1 - Configured as HEXA connected to APMEM PSRAM chip (Sheet 6 on schematic)
XSPI2 - Configured as OCTO connected to MX66UW1G45GXDI00 FLASH (Sheet 5 on the schematic)

I've merged XSPI1 and PSRAM config form "XSPI_PSRAM_MemoryMapped" project into "XSPI_NOR_ReadWhileWrite_DTR" Boot project and at the point where Boot is supposed to jump into application in external FLASH at address 0x70000000 if I put debug point after memory is mapped I am supposed to be able to dump memory using "Memory Browser" in STM32CubeIDE.

Memory at 0x90000000, external PSRAM is visible.
Memory at 0x70000000, exernal FLASH is not visible.

However, I think I've found out what the problem is.....

There is serious bug in "XSPI_NOR_ReadWhileWrite_DTR_Boot" project code that causes external FLASH on XSPI2 not to be visible if XSPI1 is enabled at the same time. This project only works by chance.

I'll publish what the bug is, and what the fix is here and hopefully ST is going to update and fix that in next release of STM32CubeMX package for STM32H7S.

Current firmware package that we are using is "STM32Cube FW_H7RS V1.2.0" and bug is there.
It needs to be fixed in next release of firmware package o people do not run into same problem as I did.