Installing the binary font at the external SDRAM on the STM32F429BI board will Cause program crash.
Here are my programs:
const int FontCacheSize = 10000;
uint8_t fontdata[FontCacheSize] __attribute__((at(0XC0E00000))) __attribute__ ((aligned(4)));
FrontendApplication::FrontendApplication(Model& m, FrontendHeap& heap)
: FrontendApplicationBase(m, heap)
{
FIL fil; /* File object */
FRESULT fr; /* FatFs return code */
UINT br;
fontCache.setMemory(fontdata, FontCacheSize);
/* Open a text file */
fr = f_open(&fil, "0:/Font_VINERITC_TTF_20_4bpp.bin", FA_READ|FA_WRITE|FA_OPEN_ALWAYS);
if(fr == FR_OK)
{
fr = f_read(&fil, fontdata, FontCacheSize, &br);
fr = f_close(&fil);
new (&bf) BinaryFont((const struct touchgfx::BinaryFontData*)fontdata);
TypedTextDatabase::setFont(Typography::DEFAULT, &bf);
}
}
Sometimes it able to work. But , if I touch the screen the program will crash.
Most of the time,the program crash on the power on.
2�?I'm not sure what this filedatareader is. Who can give me an example. The chip is stm32f429bi, and the file system is FatFs.Thank you .

