Hexadeca-SPI interface with PSRAM in memory mapped mode on MB1829
I am working with Discovery kit with STM32U5A9NJ MCU (MB1829) and I am trying to implement code to read and write the PSRAM (APS512XXN-OBRx DDR Octal SPI PSRAM) in memory mapped mode.
All GPIOs are properly configured. (I used MXCube)
The configurations are done following the instructions in the datasheet (RM0456 Rev 4), the driver comments in stm32u5xx_hal_xspi.c file and the datasheet for the PSRAM ( APS512XXN-OBR-BE.pdf)
HAL_XSPI_Init()
HAL_XSPI_Command()
HAL_XSPI_MemoryMapped()
Access method: Dereferencing the pointer to:
#define HSPI1_BASE (0xA0000000UL)
mem_addr = (__IO uint8_t *)(HSPI1_BASE + 0x0);
I also added the new xrw section into the linker file with origin 0xa0000000
The reads seem to work, but the writes are not updating the memory. I checked the MPU and I don’t see a problem there.
Could you please provide sample examples of how to configure the PSRAM on HSPI1 in memory mapped mode?
Regards,
EF.