2021-04-06 12:30 AM
I want to put my font data into external flash from internal flash. So, I configure and implement my code following docs of touchgfx-4.16.
https://support.touchgfx.com/docs/development/scenarios/using-serial-flash
There are some source codes;
static FontFlashReader fontReader;
static STM32TouchController tc;
//static STM32L4DMA dma;
static NoDMA dma;
//static LCD24bpp display;
static LCD16bppSerialFlash display(fontReader);
static ApplicationFontProvider fontProvider;
static Texts texts;
static TouchGFXHAL hal(dma, display, tc, 320, 360);
static WatchButtonController buttonController;
void touchgfx_init()
{
Bitmap::registerBitmapDatabase(BitmapDatabase::getInstance(), BitmapDatabase::getInstanceSize());
TypedText::registerTexts(&texts);
Texts::setLanguage(0);
hal.setDataReader(&fontReader);
fontProvider.setFlashReader(&fontReader);
FontManager::setFontProvider(&fontProvider);
FrontendHeap& heap = FrontendHeap::getInstance();
/*
* we need to obtain the reference above to initialize the frontend heap.
*/
(void)heap;
/*
* Initialize TouchGFX
*/
hal.initialize();
hal.setButtonController(&buttonController);
}
It is fine to get font data from external flash.
But, there always be a hard-fault when LCD drawing Text.
debug info
2021-04-06 02:35 AM
I have the same problem in IAR IDE.
In your project the image in the external flash work fine? Only one image without the text and font in the project.
In my project the images in external flash has no problem.
2021-04-06 02:45 AM
Same problem.
Is there anything else that needs to be configured, in addition to the code listed above.
2021-04-06 03:03 AM
2021-04-06 03:46 AM
Thanks! If I find any solutions or differences, I will upload my letter in time.
2021-04-06 04:00 AM
thanks
2021-04-16 04:04 AM
Any news?
2021-04-16 05:35 PM