cancel
Showing results for 
Search instead for 
Did you mean: 

About STM32F429 TouchGFX Using External Flash (W25Q128)

MKoca.1
Senior

Hello to everyone. I am working with STM32F429 mcu on Touchgfx. I have successfully run the Touchgfx. I am using a 7inch screen and sending images line by line with DMA. I want to use an external flash as I have too many images to use. I am using W25Q128 flash. Normally I was able to write and read, but could not integrate it with Touchgfx. I could not integrate the MB1642BDataReader library in the STM32G0 example into STM32F429. Would you help me with this topic? Am I following the wrong path? @Flemming Gram CHRISTENSEN​ @Martin KJELDSEN​ 

13 REPLIES 13
zzzzz
Senior

External flash needs to be set to memory-mapped mode. Then added a section for it in ld file and attribute all images to this section. It should work.

MKoca.1
Senior

Firstly, thank you for your reply. I made the adjustments in the id file as in the pictures. The code is being compiled, but the pictures that should be on the 7 inch screen are not visible. I don't know how to set the external flash to memory mapped mode. Can you help me ?

MKoca.1
Senior

Firstly, thank you for your reply. I made the adjustments in the id file as in the pictures. The code is being compiled, but the pictures that should be on the 7 inch screen are not visible. I don't know how to set the external flash to memory mapped mode. Can you help me ?0693W000008GJMeQAO.jpg0693W000008GJMPQA4.jpg

zzzzz
Senior

sorry, my bad. I didn't notice you are using F4 MCU. It doesn't have QSPI interface and not support memory-mapped mode. In my case, it is F7.

Here is the link shows how to config memory-mapped mode:

https://support.touchgfx.com/docs/development/board-bring-up/how-to/06-flash-external-addressable

MKoca.1
Senior

The block mode you said here is configured with FMC. The flash I used is W25Q128. Typical SPI configured with STM32F429 mcu. I'm very confused.0693W000008GNRdQAO.jpg

zzzzz
Senior

Here is what I understand, may not 100% correct.

https://support.touchgfx.com/docs/development/board-bring-up/how-to/07-flash-external-nonaddressable

1 This article says the user needs to implement the read function to develop the TouchGFX abstraction layer if the external flash does not support memory-mapped mode. The FMC NAND flash is just an example. In your case is an SPI NOR flash. Both of them do not support memory-mapped mode. you need to create a read function with the format in this article. I think you have created it as you mentioned you had tested read and write.

https://support.touchgfx.com/docs/development/scenarios/using-non-memory-mapped-flash

2 This article shows how to create an image cache. External RAM is memory-mapped. The user could copy all images to this cache during startup. The function you created will be used in TouchGFXHAL::blockCopy function,

https://support.touchgfx.com/docs/development/scenarios/using-serial-flash

3 This one shows how to use serial flash for images and font. the reading function is used to implement the interfaces in FlashDataReader class. TGFX uses these interfaces to grab data in SPI flash.

You could either implement 2 or 3 for your project.

It is not going to work as an FMC device, that would be for 8 or 16-bit parallel memories, not QuadSPI

With QuadSPI FLASH on a F429, you're going to have to interface in 1-bit SPI mode, and transit data through an SRAM on it's way to video or frame-buffer handling software.

Would an F469 device work? That supports QSPI

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MKoca.1
Senior

@Community member​  Thank you for your answer. I have to use F429 in this project.

@zzzzz​  Thank you for your answer. When I browsed through the manuals on TGFX site, I learned that I need to write flashloader. There is an example of writing flashloader for QSPI on the site. But I couldn't see a flashloader example for SPI. It will be easier for me to learn if there is at least an example. I don't know how to write this flashloader.

0693W000008GW8BQAW.jpg