Skip to content

Commit 0cbe3c6

Browse files
Alain Volmatcfriedt
authored andcommitted
boards: st: stm32h7s78_dk: enable MEMC & SMH for display
In case of DISPLAY is enabled, ensure that MEMC as well as Shared-Multi-Heap is enabled in order to use for framebuffer. Moreover, since PSRAM is 32MB large, HEAP size should be set AUTO instead of SMALL which is the default since SRAM is rather small. Signed-off-by: Alain Volmat <[email protected]>
1 parent 7610d21 commit 0cbe3c6

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

boards/st/stm32h7s78_dk/Kconfig.defconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,21 @@ config NET_L2_ETHERNET
1414

1515
endif # NETWORKING
1616

17+
if DISPLAY
18+
# MEMC needs to be enabled in order to store
19+
# display frame buffer to external PSRAM
20+
config MEMC
21+
default y
22+
23+
# Rely on Multi-Heap / Shared-Multi-Heap for PSRAM access
24+
config MULTI_HEAP
25+
default y
26+
config SHARED_MULTI_HEAP
27+
default y
28+
29+
# Let LTDC use memory allocated via SMH
30+
config STM32_LTDC_FB_USE_SHARED_MULTI_HEAP
31+
default y
32+
endif # DISPLAY
33+
1734
endif # BOARD_STM32H7S78_DK

boards/st/stm32h7s78_dk/stm32h7s78_dk_defconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,10 @@ CONFIG_UART_CONSOLE=y
1818

1919
# enable GPIO
2020
CONFIG_GPIO=y
21+
22+
# SRAM0 being small (128KB), SYS_HEAP_SMALL_ONLY
23+
# is automatically selected, leading to not being
24+
# able to tackle HEAP on the large PSRAM. Force it
25+
# to AUTO in order to be able to handle HEAP on
26+
# both SRAM and PSRAM
27+
CONFIG_SYS_HEAP_AUTO=y

0 commit comments

Comments
 (0)