2024-11-21 04:40 AM - last edited on 2024-11-25 07:32 AM by SofLit
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:
We tested the setup and observed the following:
Questions:
We would greatly appreciate any insights or guidance on this issue.
Thank you!
2024-11-21 05:16 AM - edited 2024-11-21 05:17 AM
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.
2024-11-22 05:32 AM
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.
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:
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.
2024-11-22 06:19 AM - edited 2024-11-22 06:26 AM
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.
2024-11-25 07:30 AM
Hi @KDJEM.1 ,
Thank you for your response.
As mentioned, we understand that RWW needs to be supported by the Octal SPI NOR flash memory, which is true in our case. We are using ISSI Octal Flash Memory that supports RWW. We have connected the ISSI flash memory in place of the Macronix flash on the STM32U5A9J-DK as shown in the attached image.
The RWW example provided by you is for the STM32H7S78-DK, which uses an xSPI IO Manager. However, our board (STM32U5A9J-DK) is equipped with an OSPI IO Manager.
Referring to the AN5050 (page 25):
XSPI Configurations for RWW example that you have given :
However, the OSPI IO Manager does not provide these options:
As a result:
This limitation seems to make it impossible to access the ISSI flash memory from both OSPI1 and OSPI2 instances simultaneously in multiplexed mode using the OSPI IO Manager.
Could you please confirm whether our understanding is correct?
Thank You .
2024-11-26 05:02 AM
Hi @KDJEM.1 ,
Can you please reply on our query in the previous post. This is really important for us to move forward in our current project. We are kind of blocked and want your confirmation.
If RWW is not possible by using multiplexed mode (by using both OSPI1 and OPSI2) , is there any other way to do RWW on STM32U5A9J-DK.
Thank You.
2024-11-27 05:25 AM - edited 2024-12-02 03:09 AM
Hello @sohm
For my part, I have not found an RWW example with the STM32U5A9 device for the moment.
Could you please give more information about your use case? Is the firmware upgrade?
Maybe you can use two memories configured separately, not in multiplexed mode.
Could you try to configure OCTOSPI1 and the OCTSPI2 in multiplexed mode with the same chip select manually with software without using STM32CubeMX?
Let me know if the issue is solved or not.
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.
2024-12-03 12:56 AM
Hi @KDJEM.1
Sorry for the delayed response.
We are able to Read and Write by controlling the Chipselect in Software in Multiplexmode. Now we are trying to do RWW where we are trying to Write Using OSPI2 and Read using OSPI1 DMA .
Any specific Inputs on this? Do we need any changes in OSPI drivers to achieve this?
Sanath
2024-12-03 01:30 AM - edited 2024-12-03 01:34 AM
Hello @Sanath,
Thank you for updating this post.
Could you please give more information about your use case? Is the firmware upgrade?
On my side, I do not found any specific inputs or any change in OSPI driver to write using OSPI2 and read using OSPI1 DMA.
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.
2024-12-03 01:39 AM
Our Requirement is to achieve the RWW for our Flash chip which has RWW capability
Our Use case is to Write to Particular Bank(We have 4 Banks)
And while writing we need to read from another Bank.
Regards,
Sanath