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-10-25 12:10 AM
Hi, I tried to create a CubeMX project based on STM32U5A9J-DK board. and both OSPI and HSPI IOs configuration by default is NO conflict. I may find my screen shot attached. so there is no IO configuration conflict issue in my side.
Would you try to install last version of CubeMX and try this approach in your side?
2023-10-25 09:31 AM - edited 2023-10-25 09:43 AM
Maybe it is my misunderstanding -- but your image also highlights the IO data lines in YELLOW.
Are you saying that the yellow highlight is acceptable i.e. NOT A CONFLICT?
2023-10-27 01:46 AM
Yes, the yellow highlight is acceptable and I confirm the OctoSPI IO configuration in the IOC file of STM32U5 DK is correct. thanks!
2023-11-16 06:46 AM
Did you find out the issue? I can confirm STM32U5x9J-DK is supporting 512Mb HPI IoT RAM APS512XXN-OBR (and 256Mb APS256XXN-OBR), without any issue.
Alex
2023-11-20 03:39 PM
Hi Alex,
Yes, I was able to get past this issue. For reasons that I cannot explain, the IOC file mapped the IO7 line to the wrong GPIO and it was a nightmare tracking it down. Once I got that resolved things are looking a lot more rosy now.
Thanks for following up on this issue.
Cheers
2023-11-20 03:42 PM
I do have a follow up question though.
Should I set the memory type (i.e. hxspi1.Init.MemoryType) to 'HAL_XSPI_MEMTYPE_APMEM_16BITS' or 'HAL_XSPI_MEMTYPE_APMEM'? It is not clear to me what is being traded off between these two options. My understanding is that the APS512 is an x8 memory that can also work in x16 mode if we go with DTR on the IO bus.
Cheers
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