cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4P5RG two OSPI with multiplexed pin not working

Hi :

I have a custom board, the mcu is STM32L4P5RG, I also connect Flash W25Q128(OSPI1) and APS6404L(OSPI2) to it.

But I can't reset them and hal status always return HAL_ERROR. Can someone help me?

The hardware schematic(Sch.png),Clock configuration(Clock.png),OSPI configuration(OSPI1.png, OSPI2.png),Reset code(Code.png)  are as below:

I also attach my project.

Sch.pngClock.pngOSPI1.pngOSPI2.pngCode.png

1 ACCEPTED SOLUTION

Accepted Solutions

Hi :

Finally, I can reset both OSPI device. It need send more data to ensure reset successfully. Just change HAL_OSPI_ADDRESS_NONE to HAL_OSPI_ADDRESS_1_LINE will fix this.

I think it is something related to Errata sheets.

View solution in original post

11 REPLIES 11

delete git link here.

Hi @AME MCU Support Center BB , Can you help me and give me some advise?

KDJEM.1
ST Employee

Hi @Zhou JianQiang ,

Could you please try to decrease the OCTOSPI clock frequency.

As mentioned in STM32L4P5 datasheet Table 115. OCTOSPI(1) characteristics in SDR mode(2) and Table 116. OCTOSPI characteristics in DTR mode (with DQS)(1)/Octal and HyperBus™, the maximum clocks frequencies of OCTOSPI are 92 MHz in SDR mode and 90 MHz in DTR mode.

KDJEM1_0-1715676821547.pngKDJEM1_1-1715676849479.png

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.

Hi @KDJEM.1 

I have set Clock Prescaler to 2, Do you mean it doesn't enough, I have to set OCTOSPI clock from 120Mhz to 90Mhz?

Alex - APMemory
Senior II

Hi, 

Let me add few comments, I hope this helps.

Attached file for QSPI SDR & STM32L4P5 (tested on STM Disco)

Regarding QSPI device there are a couple of options possible which is not visible in the root PN APS6404L on your schematics, such as 1.8V/3V, RBX, Halfsleep ( PN such as APS6404L-3SQR / 3SQN / SQR / SQRH / SQH / SQN). For example RBX device ("SQR...") can burst only up to 84MHz, while WRAP can run up to max frequency.

For your reference,  see below an overview of different QSPI SDR/DDR options available (voltage, function, frequency, power, and type of package)

AlexAPMemory_0-1715783812801.png

Datasheet available at https://www.apmemory.com/products/psram-iot-ram/

QSPI Prototyping at https://www.mouser.com/c/semiconductors/memory-ics/dram/?m=AP%20Memory%20Technology&package%20%2F%20case=SOP-8~~USON-8%7C~WLCSP-15%7C~WLCSP-8&rp=semiconductors%2Fmemory-ics%2Fdram%7C~Package%20%2F%20Case

Regards

Alex

Hi Alex:

thank you for your reply, I use APS6404L-3SQR.

Alex - APMemory
Senior II

Good, for APS6404L-3SQR.you can use the WRAP32 command up to 133MHz and linear burst (with RBX) up to 84MHz.

Spec link:  http://www.apmemory.com/wp-content/uploads/APM_PSRAM_E3_QSPI_APS6404L-3SQR-v2.6-KGD_PKG.pdf

Hope all goes well

Alex

Hi @Alex - APMemory :

Can you tell me more about  EID? I can't find any description about this.

Alex - APMemory
Senior II

Hi, 

EID is just the ID # of our device. You don't need to use it.

Regards

Alex