AnsweredAssumed Answered

Relocating frame buffer to internal SRAM

Question asked by Andrew Stevenson on Aug 7, 2017
Latest reply on Aug 16, 2017 by Andrew Stevenson

Hello everyone,


I am attempting to relocate the frame buffer of the 'STemWin_HelloWorld' supplied with the STM32F429 Discovery kit. I would like to use the internal SRAM instead of the external SDRAM. Our project only requires 240x320 8 BPP so the SDRAM is not required.  


Has anyone any experience with how to do this?


My steps so far are based on the demo code at C:\STM32Cube_FW_F4_V1.16.0\Projects\STM32F429I-Discovery\Applications\STemWin\STemWin_HelloWorld. I am running the example code on the actual Discovery kit.


I changed the #define LCD_LAYER0_FRAME_BUFFER in LCDConf_stm32f429i_disco_MB1075.c to the address of the 112KB SRAM which is 0x2000 0000 (page 85 of en.DM00071990.pdf).


When I run the code on the debugger the program stops in the HardFault_Handler() and the call stack is indicating it failed after CUSTOM_FillRect() calls DMA2D_FillBuffer().


Any suggestions gratefully received.