cancel
Showing results for 
Search instead for 
Did you mean: 

40 bytes Limit when reading/writing using QSPI DMA - STM32G473VET6 and External Flash W25N01GVZEIG

hvgupta
Associate II

In the datasheet of W25N01GVZEIG,

Data program load and quad data program load can transfer up to (2048+64) bytes.

(The transfer of data between the controller and the external flash uses DMA)

When I try to write 2048 bytes, nothing is written. The same things happen when reading, where nothing is read if the buffer size if 2048.

Both only seem to work when dealing with <=40 bytes

I have tried to write 2048 bytes and read 40 bytes and write 40 bytes and read 2048 bytes. In both cases nothing is read.

 

Is there something I am missing. The clock's frequency is 170 MHz, and the prescaler of the QSPI is 1

1 ACCEPTED SOLUTION

Accepted Solutions

Initially the FIFO threshold I set was 4,

To test things out I tried to set it back 1, and that seems to have solved a problem. Not sure if this was the reason but I guess I want to put it out here

View solution in original post

4 REPLIES 4
STOne-32
ST Employee

Dear @hvgupta ,

Do you have schematics on how is connected to the QSPI controller and what is the VDD value ? I suggest to reduce the system frequency to have a QSPI clock at 50MHz or lower for testing purposes . Let us know 

STOne-32

The schematics of controller QSPI connection is PF10 (clock), PC2 (IO1), PC3 (IO2), PD7(IO3), PD4(IO0) and PD3(NCS)

 

QSPI mode: BANK2 with QUAD SPI Lines and also a DMA channel

hvgupta_0-1722185577860.png

 

for VDD I have 3.3V

 

The reason why I set the clock to that high is because, the controller is connected to other peripheries also, and this external flash supports up to 104MHz (thats why the prescaler of 1)

Initially the FIFO threshold I set was 4,

To test things out I tried to set it back 1, and that seems to have solved a problem. Not sure if this was the reason but I guess I want to put it out here

Glad to see you solved it ! and shared back with us . much appreciated.

STOne-32.