2023-10-23 05:38 PM
I am trying to bring up the STM32U5A9J-DK wherein I can use the external NOR_FLASH over OctoSPI_1 and the external PSRAM over HSPI_1 -- both in memory mapped mode. I am trying to use the STM32CubeMX to generate the drivers but am having some difficulties.
I have tried using the 'default' configuration suggested by the CubeMX IDE and have also tried , unsuccessfully, to tweak some of the GPIO setttings. Bottom line, no matter what I do, the IDE always insists that the Data pins in the OCTOSPI1 are in conflict with a whole host of other functions -- But I don't think they are because the Alternate Functions are set up correctly.
So why in blazes is the CubeMX saying that there is a conflict? NOTHING MAKES SENSE HERE.
I have attached a screenshot of the IDE showing the conflicts. Thanks for any help.
I am attaching a screen shot of the IDE where I see the conflict.
Solved! Go to Solution.
2023-11-21 11:36 AM - edited 2023-11-21 11:37 AM
Hi,
APMemory PN with "XX' (like APS512XXN-OBR or APS256XX-OBR) are supporting both OPI & HPI mode. The device is booting in x8 and can be swap to x16 by mode register. The command you mentioned are setting the configuration on the MCU side.
The benefit of using HPI x16 mode are following:
Below are illustrations of pin count & power benefit of OPI versus SDRAMx16 & HPI versus SDRAMx32
Hope this help
Alex
2023-10-23 11:52 PM
Hi, what tweak of IOs setting you implemented? I may have a try to see if it's easy to reproduce this issue. thanks!
2023-10-24 08:19 AM
Hi
Thanks for the follow up. I have no idea where to begin my response to your specific question. If you take a look at the attached screen shot you will notice that all data pins of the OCTOSPI1 are shown in YELLOW. It is not clear to me if this is just a 'notification' or that it will actually cause operational errors.
Thanks for your help again.
2023-10-24 08:39 AM
Hello @RMand
According to the screenshot you have shared, the GPIO settings are not inline with default configuration in STM32U5A9J-DK. You can refer to schematics for details. Also, you are missing some parameters in the settings.
We suggest you the following project. It shows how to erase, write and read data on HSPI configured as a single x16 STM32Cube\Repository\STM32Cube_FW_U5_V1.3.0\Projects\STM32U5x9J-DK\Examples\BSP
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.
2023-10-24 10:25 AM
Hi @FBL
I am attaching a newly created configuration generated by CubeMX when I select the 'STM32U5A9J-DK' board. If you load it up in your local install of CubeMX you will see that the default configuration also shows the 8 data lines of OSPI1 as 'in conflict'......
The web GUI does not allow me to upload the .ioc file so I am trying it now with a .txt extension.
2023-10-24 10:39 AM
And thanks for the pointer to the example -- I will review it now.
2023-10-24 11:21 AM
I do not see a IOC configuration file for the BSP example. Where can I get one?
2023-10-24 11:28 AM
>>I do not see a IOC configuration file for the BSP example. Where can I get one?
Manually crafted content does not use / come from .IOC configuration files.
2023-10-24 02:00 PM
Ooops, I clicked on the wrong button....
I wanted to say that the example listed above does NOT USE MEMORY MAPPED mode for the HSPI PSRAM. My original question was about any active projects that show the operation of the AP512 PSRAM in memory mapped mode over the HSPI interface.
2023-10-24 02:36 PM - edited 2023-10-24 03:11 PM
The DMA example perhaps gets the closest.
STM32Cube_FW_U5_V1.3.0\Drivers\BSP\STM32U5x9J-DK\stm32u5x9j_discovery_hspi.c
(++) The memory access can be configured in memory-mapped mode with the call of function BSP_HSPI_RAM_EnableMemoryMapped(). To go back in indirect mode, the function BSP_HSPI_RAM_DisableMemoryMapped() should be used.
File also pulled via STM32Cube_FW_U5_V1.3.0\Projects\STM32U5x9J-DK\Templates\TrustZoneDisabled\STM32CubeIDE\.project