Running the stm32f429_disco_no_os_sw4stm32 without external SDRAM


What MCU/Processor/Board and compiler are you using?

STM32F429-Discovery board

What do you want to achieve?

Use the stm32f429_disco_no_os_sw4stm32 demo without using external SDRAM, and just using the RAD of the STM32F429 device.

What have you tried so far?

I have set the TFT_EXT_FB = 0 define in the tft.h file, and tried to compile the project. First time it failed to compile as the project’s RAM usage was higher than the available 192 kB. At 2nd try it compiled, but with 98.66% usage.
The “Memory Details” shows that the biggest RAM consumer is the uint16_t my_fb frame buffer, which is defined to the screen size: 240*320=76800, but uses 150 kB RAM (probably due to 32 bit memory with of STM32).

Code to reproduce

I checked that my_fb is defined as

static uint16_t my_fb[TFT_HOR_RES * TFT_VER_RES];

and used in the tft_flush() function by the DMA data transfer.

static lv_color_t disp_buf1[TFT_HOR_RES * 40];

defined in tft_init() is not used anywhere. I assume disp_buf1 should be used by the DMA data transfer, but I’m not sure how to rewrite the code to use only a TFT_HOR_RES * 40 sized frame buffer.

Thank you for your advices in advance.

First of all, you’ve either typed something incorrectly, or you are using the wrong project with the wrong board.

You say that you have the F429 board but you are using the F469 project.

Thanks for noting. I have corrected to F429.


Take a look at this post: STM32F429-DISC1 demo and RAM usage

Using color of type uint16_t means 2 bytes per pixel, so it requires 240 x 320 x 2 bytes = 150KB of memory.

I suggest you to move as most as possible variables and stack to the CCM RAM memory (another 64KB of data), but move here only data which won’t be used by peripherals).