Skip to main content
Soup
Associate
April 5, 2019
Solved

QSPI dual-flash memory mode with TouchGFX

  • April 5, 2019
  • 3 replies
  • 1395 views

I was wondering if it's possible to use dual-flash memory mode with TouchGFX, and if so is there any documentation available ?

This topic has been closed for replies.
Best answer by Andreas Bolsch

In memory mapped mode you won't see any difference between single and dual flash mode (except for the memory size and faster transfer).

So no need to change anything else. Even if the flash needs some configuration during initialization in indirect read/write mode when both chips are of the same type: As all commands are send to both simultaneously, only the command parameters need to be "doubled". I. e. if you are going to read the status registers, the transfer length would be 0x1 (=two bytes) instead of 0x0 (one byte), and accordingly two bytes have to be read.

3 replies

Andreas Bolsch
Lead III
April 6, 2019

What's the point here? QSPI single or dual flash mode just gives additional read-only memory mapped into address space of the CPU. Check the corresponding RM and firmware sources for e.g . STM32F769I-Disco, there you will see how to deal with memory mapped mode of QSPI flash.

Single vs. dual flash mode means only setting DFM bit in QUADSPI_CR register, incrementing FSIZE field in QUADSPI_DCR (and initialization of the additional GPIO pins in the very same way as those in single mode).

Soup
SoupAuthor
Associate
April 15, 2019

Hey, thanks for the reply.

I did set the DFM bit using the HAL libraries and also my total size (2 * 64Mb).

I assume i still need to change some DMA settings...

QSPIHandle.Init.FlashSize = (26); // 128MB, FSIZE = 27-1
QSPIHandle.Init.DualFlash = QSPI_DUALFLASH_ENABLE;

Andreas Bolsch
Andreas BolschBest answer
Lead III
April 15, 2019

In memory mapped mode you won't see any difference between single and dual flash mode (except for the memory size and faster transfer).

So no need to change anything else. Even if the flash needs some configuration during initialization in indirect read/write mode when both chips are of the same type: As all commands are send to both simultaneously, only the command parameters need to be "doubled". I. e. if you are going to read the status registers, the transfer length would be 0x1 (=two bytes) instead of 0x0 (one byte), and accordingly two bytes have to be read.

Soup
SoupAuthor
Associate
April 16, 2019

i've changed all my command parameters and also the transfer length according from what i've seen on the Disco example. I also checked my hardware configuration. Still not working as intended

Soup
SoupAuthor
Associate
April 25, 2019

I've finished this project today. The thing you need to remember is that the command parameters need to be doubled like Andreas said.

Look to the 69-Disco example and diff with a normal example so you can see the differences.