2024-10-28 02:03 PM - edited 2024-10-28 02:07 PM
I've successfully configured a 64Mbit PSRAM with the OCTOSPI peripheral of my STM32H7B0 microcontroller in Quad and memory-mapped mode, although according to another thread and the erratas of the OCTOSPI peripheral, I understand that you should only write data in 64 bit chunks otherwise due to some bug with the DQS it may write zeros to memory. Other than this bug writing and reading the memory in memory-mapped mode has worked alright.
My Question is, is there a way to use this memory-mapped area with the Rx DMA of SPI? When I call HAL_SPI_Receive_DMA(&hspi1, spibuf, DMASIZE); and spibuf is in the internal SRAM I have no problem and it works just right, but when I put the spibuf array inside the PSRAM memory area (0x90000000) it stops working after a short while due to a dma transfer error. I tried turning on the FIFO and Burst mode for the Rx DMA in STM32Cube and set the burst to 8 increment (for the 64 bits writes of the PSRAM) but it still doesn't work.
So my question is, is there any way to use SPI Rx DMA with the buffer inside memory mapped OCTOSPI? My last resort way is to put a smaller array in the internal sram, turn on the half complete and complete interrupts and memcpy the data into the PSRAM by hand, but I decided to ask whether a hardware/firmware solution exists so I wouldn't have to memcpy the data by hand.
Thanks for your time
2024-11-28 02:44 AM
Hello @IJoe.1
Firstly, I apologize for my late reply.
About memory-mapped write error response when DQS output is disabled errata:
If the memory does not support DQS, only 64 bits can be written which is confirmed now, there is no workaround.
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.