[N9H20 Non-OS] How to enable multiple buffers to avoid flicker or tearing?

Post Reply
9chuckyoung
Posts: 88
Joined: 28 Jan 2019, 13:49

21 Apr 2020, 15:08

Platform: N9H20
Platform resource link: https://www.nuvoton.com/hq/products/app ... _locale=en
BSP link: https://github.com/OpenNuvoton/N9H20_emWin_NonOS
IDE: Keil professional

NOTE: Please download the latest version of N9H20 BSP from OpenNuvoton.
NOTE: Suggest to increase frame buffer count to 3, if you still encounter tearing or flicker on two frame buffers.

Follow the steps to enable emWin multiple buffers:
1. remove LCDConf.c from sample project
2. add LCDConf2.c to sample project
3. remove GUIConf2.c from sample project
4. add GUIConf2.c to sample project
5. increase main.c frame buffer size

Code: Select all

#ifdef __ICCARM__
#pragma data_alignment = 32
UINT8 u8FrameBuf[XSIZE_PHYS*YSIZE_PHYS*2*3];
#else
UINT8 u8FrameBuf[XSIZE_PHYS*YSIZE_PHYS*2*3] __attribute__((aligned(32)));
#endif
6. enable multiple buffers after GUI_Init():

Code: Select all

GUI_Init();

WM_MULTIBUF_Enable(1);
GUI_MEMDEV_MULTIBUF_Enable(1);
7. password is nuvoton
Attachments
N9H20_multiple_buffers.zip
files to enable multiple buffers
(5.2 KiB) Downloaded 120 times

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest