cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4P5-DK with Quad SPI RAM, do I have to remove the Octo SPI RAM

mluerkens
Associate III

The board can be populated with a Quad SPI PSRAM, sharing OCTOSPI1. Do I need to remove the OctoSPI before using the Quad SPI or is it enough to disconned CS?

1 ACCEPTED SOLUTION

Accepted Solutions
mluerkens
Associate III

Hi Alex, AN5050 is setting chips select boundary to 0, your code is setting it to 9 which seems to be the correct value. I reduced the buffer size for testing to 4k and using that shows no errors. Seems my flying lead setup is really causing the problems. I found a friend, being able to put the memory on the discokit.

Tx

Matthias

View solution in original post

17 REPLIES 17
Alex - APMemory
Senior II

You can just disconnect CS of Quad SPI, no need to remove OctoSPI memory.

Regards

Alex 

PS: fyi, you can have a wide range of QSPI RAM option from 16Mb up to 128Mb, SDR/DDR, 1.8V/3V, SOP8/USON8/WLCSP (APMemory PN: APS1604M-..., APS6404L-..., APS12804O-...)

mluerkens
Associate III

Hi Alex, thanks

we have planned with an APS1604M-3SQR in combination with STM32L4P5

Tx

Matthias

mluerkens
Associate III

I'm having issued to get it working. Unfortunately I failed with the STM32L4P5-DK and soldering the 0402 33Ohm Resistors, So actually I connected the APS1604M-3SQR to a nucleo with the STM32L4P5 with a bread board :-(. Yes it is ugly. I set the octospi clock down to 40 MHz.

I'm following AN5050 and copied the source code for initializing the and testing the PSRAM, but it fails. It is not visible.

I found this main.c in the forum (unfortunately with the main.h), it seems to be for an APS1608 due to the chip size.

I used the first steps of init from this sample and tried to issue a read id which returns som random values. So either my setup won't work at all with a bread board or I'm doing wrong something else.

E.G. the attached main.c is adding some additional lines to the MX_OCTOSPI_INIT

 hospi1.Init.WrapSize = HAL_OSPI_WRAP_NOT_SUPPORTED;

 hospi1.Init.ClkChipSelectHighTime = 0;

 hospi1.Init.MaxTran = 0;

This is different from AN5050 where it is defined to be 482

 hospi1.Init.Refresh = 0;

Is there anone out, being able to share his experience.

mluerkens
Associate III

oops, read id is working on setting the frequency below 33 Mhz. So I'm still puzzled

Alex - APMemory
Senior II

Hi Matthias,

This is strange why you could not use the original Discokit from STM. we can confirm both QSPI and OPI are running well on this board (and much rmore reliable than bread board).

For your reference, the attachment (main.c & main.h) is a small check program for reading and writing PSRAM, which can be executed for simple check..

l  If the memory is executed correctly then LED1 will toggle.

l  If the LED2 (GPIO_PIN_14) does not light up, the environment is correct.

/*---------------

Function description:

  PSRAM using APMemory QSPI SDR , first enter Quad mode,

  and then read and write 16Byte in a cycle.

  If there is an error the LED of GPIO_PIN_14 lights up.

-------------- */

Hope this help

Alex

Alex - APMemory
Senior II
 
Alex - APMemory
Senior II
 
mluerkens
Associate III

Hi Alex, thanks, regarding the discokit it's just a lack of mechanical skills to populate the 0402 resistors.I try to find somebody being able to do the soldering work.

Thanks, I keep you updated.

mluerkens
Associate III

Hi Alex, AN5050 is setting chips select boundary to 0, your code is setting it to 9 which seems to be the correct value. I reduced the buffer size for testing to 4k and using that shows no errors. Seems my flying lead setup is really causing the problems. I found a friend, being able to put the memory on the discokit.

Tx

Matthias