8 bits of bun

You are here:   Home > 8Bunbits for a rabbyte > LVGL speed on Teensy 3.6

LVGL speed on Teensy 3.6


For those unfamiliar with lvgl, it's full name is: littlev graphics library, and is a graphical library meant for microcontrollers.

Learn more on their website.

Regarding the demo: it's a graph with 120 datapoints, one LED, stock 30px font displaying one text, and one page on a 320x240 px ili9341c screen with 16bit depth and AA enabled

teensy gui.jpg



The v5.0 arduino port has a rather huge screendraw time on my teensy 3.6 @ 180mhz (12fps), fastest compile settings for my own made demo.
That's way too huge in my opinion for my demo, though i took simple steps to recude that to an average of 55fps

First of all: DMA is your friend for offloading screendrawing from the mcu core (in my case by SPI) as it saves the wait times for the SPI screendraw untill complete.
Now, the following step i undertook was upgrading to littlevgl v5.1, which has way less cpu overhead (like up to 4x faster AA)
The last step was to put drawing commands in RAM, which executes faster than ROM.

Now, this all wasn't too hard to do because the people at PJRC and the community supply such good support and have written excellent libraries for the teensy development boards.


If you need > 60FPS, simply increase the MCU clock to 240mhz in the compiler options, this can get you up to 90fps in my homebrew demo.


Update april 15, 2018

got it to run much faster by switching from compile option "fast" to "fastest with pure code + LTO" (120+ FPS achieved at 240mhz), though this requires a little more RAM. yes 120fps on 240x320px means we can get up to 60fps at 480x320px (double pixel count), which is really nice to have

 

 

top