HeliOS icon indicating copy to clipboard operation
HeliOS copied to clipboard

Examples of working with esp32 or stm32 and displays

Open brightproject opened this issue 6 months ago β€’ 6 comments

Can anyone tell me if this scheduler has been used for tasks more complex than blinking LEDs or outputting messages to a serial? For example, working with displays, or even better, working with the lvgl graphics library?

5435893472801453137

Does the library have the ability to work with a dual-processor esp32s3 microcontroller? Is there some kind of analog of a mutex like in freeRTOS?

https://docs.lvgl.io/master/details/integration/adding-lvgl-to-your-project/threading.html#method-2-use-a-mutex

I would be glad to have a constructive discussion with engineersπŸ˜€

brightproject avatar Jul 21 '25 16:07 brightproject

Hi , based on my understanding Yes, the Helios scheduler can definitely handle more than basic LED blinking or UART prints β€” but ..

It has been used for moderately complex tasks like driving SPI/IΒ²C displays (SSD1306, ST7735, etc.) and updating sensor dashboards, as long as the drivers are non-blocking. For something like LVGL, it’s possible too β€” you just need to call lv_timer_handler() periodically from a Helios task and make sure all GUI updates happen from the same context (or are protected).

LVGL keeps internal data structures for things like:

Display buffers

Active screens and widgets

Animation lists

These aren’t protected by default β€” meaning if two tasks modify the GUI at once, LVGL can crash or corrupt memory. That’s why LVGL’s docs say:

β€œAll LVGL API functions must be called from the same thread, or protected by a mutex.”

So LVGL itself doesn’t block β€” you just need to make sure no two threads/tasks access it simultaneously.

In a single-threaded (or cooperative) environment like Helios, that’s simple:

Just make all LVGL calls from one task.

No mutex is even needed in that case.

Regarding the dual-core ESP32-S3, Helios itself doesn’t implement SMP scheduling. You can manually pin the scheduler to one core and run other workloads (like display refresh) on the second core, but inter-core communication will have to be handled manually (via queues, shared buffers, or simple sync flags).

Biancaa-R avatar Oct 12 '25 19:10 Biancaa-R

Thank you @Biancaa-R for the response. πŸ™πŸ™πŸ™πŸ™

MannyPeterson avatar Oct 17 '25 21:10 MannyPeterson

Thank you @Biancaa-R for the response. πŸ™πŸ™πŸ™πŸ™

Sure :)

Biancaa-R avatar Oct 18 '25 02:10 Biancaa-R

Thank you @Biancaa-R for the response. πŸ™πŸ™πŸ™πŸ™

I would like not just words and theory, but concrete examples of working with lvglπŸ˜€

brightproject avatar Oct 19 '25 07:10 brightproject

Thank you @Biancaa-R for the response. πŸ™πŸ™πŸ™πŸ™

I would like not just words and theory, but concrete examples of working with lvglπŸ˜€

Hmmm hmm ,If I work on something related to this after this ,Ill send it across.

Biancaa-R avatar Oct 19 '25 11:10 Biancaa-R

Thank you @Biancaa-R for the response. πŸ™πŸ™πŸ™πŸ™

I would like not just words and theory, but concrete examples of working with lvglπŸ˜€

Hmmm hmm ,If I work on something related to this after this ,Ill send it across.

@Biancaa-R I suggest waiting on any new implementations. Helios 0.5.0 is coming out and there are important improvements. Feel free to check out the develop branch for a sneak peek. πŸ™‚

MannyPeterson avatar Oct 19 '25 19:10 MannyPeterson