2019-06-04 03:53 AM
I was design a custom board with a MCU STM32F767BI, a LCD with 800x600 pixels and a SDRAM with 64Mb. I'm getting a HardFaultHandler after run some time the aplication and it faults inside the process GUI_Exec() according to the PC register. Analizing the fault details, the PRECISERR bit is set and the BFAR has the address 0x480772a4. This address hits in a "Reserved" region in the memory mapping, between AHB2 and AHB1.
The configuration of the LCD-TFT and SDRAM is according to the specifications of the manufacturer and I suspite the problem could be the MPU/cache configuration. The framebuffer is allocated in the top of the SDRAM and his size is aprox 1Mb (800*600*16bpp)
I'm setup the MPU and the cache with the following regions
Is there wrong in some configuration in the MPU/cache? Can you help to find a workaround to prevent this hardfault?
Thank you for your help!
Best regards!
2019-06-16 11:56 PM
Hi again,
I found some issues that improve the performance and it seems solve the hardfault (it was runnning during 2 days non-stop and I wasn't get any hardfault).
The issue I was found was:
At first time, the HCLK was setup to run 216MHz and the FMC SDRAM was setup to generate a CLKSDRAM with HCLK/2 (108MHz). The MCU datasheet is decribed the maximum value of CLKSDRAM and is 100MHz, thus, I was setup the HCLK to run ar 200MHz to have a maximum compatible bandwidth witch the SDRAM.
Best regards!