cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with RWW Configuration Using OSPI1 and OSPI2 on STM32U5A9J-DK

sohm
Associate III

Hi,

We are using the STM32U5A9J-DK board and are trying to achieve Read-While-Write (RWW) functionality. The flash chip we are using supports RWW.

Earlier, as per [this post](post link), we learned that to achieve RWW, we need two OSPI instances, namely OSPI1 and OSPI2.

Here are the configurations for both OSPI1 and OSPI2 in STM32CubeIDE:

  • OSPI1 Configuration:
    OSPI1.png

  • OSPI2 Configuration: 

    OSPI2.png


We tested the setup and observed the following:

  1. Using OSPI1, we can successfully perform read, write, and erase operations on the flash memory.
  2. However, when attempting to access the flash memory with OSPI2, we are unable to perform these operations.

Questions:

  1. Is our current configuration of OSPI1 and OSPI2 (in multiplexed mode) correct for achieving RWW?
  2. Can you provide an example application where RWW is implemented using OSPI1 and OSPI2?

We would greatly appreciate any insights or guidance on this issue.

Thank you!

3 REPLIES 3
KDJEM.1
ST Employee

Hello @sohm ,

 

Thank you for sharing this interesting case in the community.

However, when attempting to access the flash memory with OSPI2, we are unable to perform these operations.

->The Chip select pin is not configured for the OCTOSPI2 in OSPI2 configuration.

Is the issue solved when configuring the "Chip Select".

An RWW example is available in  https://github.com/STMicroelectronics/STM32CubeH7RS/tree/main/Projects/STM32H7S78-DK/Examples/XSPI/XSPI_NOR_ReadWhileWrite_DTR.

May be STM32CubeMX: OCTOSPI GPIOs configuration section in AN5050 can 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.

Hi @KDJEM.1 

 

Thank you for your response and the suggestions provided.

Unfortunately, the issue is not resolved after configuring the chip select for OSPI2.

Chip_select.png

As per the schematic, the flash's chip select is connected to PORT1. When we configure the chip select option in OSPI2 as PORT1 NCS, we must disable it in OSPI1. In this scenario:

  • We can access the flash using the OSPI2 instance, but OSPI1 access stops working.
  • Similarly, when OSPI1 is enabled, OSPI2 access fails.

This means we can access the flash using either OSPI1 or OSPI2, but not both simultaneously. Since RWW functionality requires both instances to work concurrently, we are facing a roadblock.

The example you shared is for a different development board. We tried replicating the configurations on our platform (STM32U5A9J-DK) but still cannot access the flash with both OSPI1 and OSPI2 instances simultaneously.


We suspect that we may be missing something in the configuration.

Could you confirm whether our current configuration aligns with the requirements for RWW? Additionally, is there any application project or reference specifically for STM32U5A9J-DK where RWW has been demonstrated to work?

Our octal SPI nor flash memory supports RWW. Can you confirm  the STM32U5A9J-DK supports RWW ?

We appreciate your guidance and support in resolving this issue.

KDJEM.1
ST Employee

Hello @sohm ,

 

As I mentioned in this post, the read while write mode needs a memory supported the RWW (have two bank), two OCTOSPIs interface (OCTOSPI1 and OCTOSPI2), OCTOSPI I/O manager. 

The MX25UM51245G memory mounted on STM32U5A9J-DK doesn't support (RWW) the multi-bank like as MX66UW1G45G memory supports XIP and RWW (Read-While-Write) due to its multi-bank structure, which allows reading data from one bank while another bank is being programmed or erased.

Please take a look at  MX25UM51245G and MX66UW1G45G datasheets.

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.