cancel
Showing results for 
Search instead for 
Did you mean: 

after using serial flash for fonts, the code jump to hardfault handler.

Dd.21
Associate II

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

0693W000008yj2YQAQ.png

7 REPLIES 7
RGenn.1
Associate II

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.

Same problem.​

Is there anything else that needs to be configured, in addition to the code listed above.

Thanks! If I find any solutions or differences, I will upload my letter in time.

RGenn.1
Associate II

thanks

RGenn.1
Associate II

Any news?

Sorry, there is still a problem