Redrawing using STemWin 2D graphics API on STM32L4R9I Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-17 2:22 AM
I'm running the STM32L4R9I STemWin HelloWorld demo, which basically renders some content to the screen, and then proceeds to an infinite loop, like this:
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
GUI_SetFont(GUI_FONT_24B_1);
GUI_DispStringHCenterAt("Hello world!", LCD_GetXSize() / 2, (LCD_GetYSize() - 16) / 2);
while (1) {
LCD_WaitForDisplayCompletion();
GUI_Exec();
LCD_ActiveRegion = 1;
LCD_WaitForDisplayCompletion();
}
I would like to keep clearing and updating the screen at preferably 30hz, but simply placing the draw instructions inside the while loop casues a lot of flicker and is not consistent at all.
I would really appreciate some insight on this!
Regards,
Johan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-17 2:51 PM
You can try use of FREERTOS
Add
osDelay(10)
after
GUI_Exec();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-10-20 1:36 AM
Hi!
Sadly I'm not using any RTOS, since it is not required for my project. I don't really need the Window Manager of STemWin either, and I'm not sure if I'm currently using it or not.
