Important: posts that do not use this template will be ignored or closed.
Before posting
- Get familiar with Markdown to format and structure your post
- Be sure to update lvgl from the latest version from the
master
branch.
- Be sure you have checked the relevant part of the documentation. We will not respond in detail to posts where you haven’t read the relevant documentation.
- If applicable use the Simulator to eliminate hardware related issues.
Delete this section if you read and applied the mentioned points.
Description
No Display
What MCU/Processor/Board and compiler are you using?
STM32F103 SPI OLED drive SH1107G
What do you want to achieve?
- Simply display “Hello Word”
What have you tried so far?
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
https://github.com/open-agri/TractorKit-Commander-OS/blob/3f6aa764134791badcbf72229750d782c0c5ee6d/components/lv_port_esp32/components/lvgl_esp32_drivers/lvgl_tft/sh1107.c
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
Could you describe what was the problem?
Maybe it will be useful for others too.
*Due to FREERTOS, the port was not properly configured
1 Like
Tasks and threads
If you need to use real tasks or threads, you need a mutex which should be invoked before the call of and released after it. Also, you have to use the same mutex in other tasks and threads around every LVGL () related function calls and codes. This way you can use LVGL in a real multitasking environment. Just make use of a mutex to avoid the concurrent calling of LVGL functions
I added a semaphore (osSemaphorID) to the system.I just used a simple test interface,I think multiple interfaces should be the same
osSemaphorID mySysSemHandle;
void LVGL_text(void)
{
osSemaphoreWait(mySysSemHandle,osWaiteForever);
Add the code you want to implement.
}
void SYS_Task(void const * argument)
{
for(;
(
osSemaphoreRelease(mySysSemHandle);
lv_tick_inc(5);
lv_task_handler();
osDelay();
)
}
I think that semaphore is not being used correctly. You would want to wait for it at the beginning of LVGL_text
and release it at the end of LVGL_text
. You would also do the same for lv_task_handler
.
I’m pretty sure it’s not doing much for you besides changing the timing the way you’re using it right now.