2019-12-05 08:31 PM
I am using STM32F429VG controller. In custom board we have used serial SPI flash to store all images. We have followed all steps mention in below link
https://touchgfx.zendesk.com/hc/en-us/articles/205886201-Placing-Assets-in-Flash-Memory
https://touchgfx.zendesk.com/hc/en-us/articles/203564102
But not able to understand
How to cache all image data from flash?
I have added Bitmap::cacheAll(); in touchgfx_init function but Blockcopy function is not getting called.
Thanks
2019-12-11 04:31 AM
Since your flash is not memory mapped the first article is of no use to you.
You may not have specified a bitmap cache that is large enough (e.g. size 0 since not configured). Then Bitmap::cacheAll() will never call Bitmap::cache() which calls blockCopy()
You define the bitmap cache in your touchgfx initialization which is outlined in the start of the second article.
/Martin
2020-06-01 06:15 AM
Hi,Martin
I'm doing the same thing, badly without success.
I use STM32F429+SDRAM+SPI-Flash with the intention of putting the assets in spi-flash and using the asset data for touchgfx by caching it.
I am referring to the official documentation <Using Non-Memory Mapped Flash for storing images> and <Caching Bitmaps>.But it didn't work out.
The current situation is to enter hardfault while executing the "void touchgfx::Texts::setLanguage(touchgfx::LanguageId id)" method in the file <texts.cpp>.It happens specifically at the "currentLanguageTypedText = typedTextDatabaseArray[id];" code.The specific code implementation is as follows:
A linked description file for putting assets into SPI-FLASH:
The cache in file <TouchGFXConfiguration.cpp> is configured as follows:
The location where the hardfault occurred is as follows:
I have been in hardfault without entering the "TouchGFXHAL::blockCopy" method before, because I am new to touchgfx, I don't know where the problem occurs, <Using Non-Memory Mapped Flash for storing images> and <Caching Bitmaps> two official documents I don't understand very well, I hope you can help me out, thanks.
2020-06-02 04:21 AM
That's because TouchGFX does not contain the addresses for the glyphs in the program, so it cannot call blockCopy() with something that makes sense to be translated into something on the SPI flash. You need to take a look at binary fonts and font caching on the support site.
Let me know when you've read those articles. Thanks!
2020-06-02 08:16 AM
Thank you very much. I'll check the appropriate documentation. I'll be the first to tell you the good news.
2020-06-04 09:17 AM
Hi,Martin。
I comment the fonts and text in the linked file, leaving only the image in the external flash. But the blockCopy() method is not called and the LCD displays a flower screen.
I read <Binary Fonts> and <Font Caching> two documents, probably know the font text also need to do some work like the image, but still do not understand the specific operation, the text of the sample code I do not know where to put, tried several times without success, whether the font text also need to call the blockCopy() method like the image, which goes back to the problem of the method is not called, I hope there is a simple example, so that learning will be very easy, will be easy to understand, thanks.
2020-06-04 09:19 AM
Oh, forgot to mention, the linked file only retains the image after it is placed in external flash and does not go into hardfault anymore.
2021-06-08 01:58 AM
Have you solved this problem? I have the same problem