2025-07-22 10:33 PM
I am currently working on a revamped version of the LVGL MicroPython binding. My goals are to make it easier to compile and also easier to use. The "official" binding only has support for SPI displays and the STM32 line of MCU's are capable of interfacing with many other types of displays that are made.
The official binding requires different drivers for specific display IC's and those drivers are written for use with specific MCU's. The drivers all have a different API which leads to quite a bit of confusion when trying to use it. This is one of the major issues when using the official binding.
What I have done to make things easier is I have split a "display driver" into 2 pieces. One is the code needed to initialize a display IC and the other is the driver for the actual connection type used the display IC driver code is written in Python while the "bus" code is written in C. The bus code is written so there is an intermediate layer that allows access to it from Python code.
I am not familiar with the STM32 line of MCU's and if there is someone that is willing to lend a hand with writing the C code for the common types of connections used with a display that would be awesome.
The connection types I am looking to support are...
I8080 16 lane
I8080 8 lane
RGB 16 lane
RGB 8 lane
octal SPI
quad SPI
dual SPI
SPI
MIPI DSI
I2C
with and without using DMA memory for all the busses listed above
Here is the hitch, what is being used needs to be something that is chosen at runtime not compile time. I don't know if that is possible with the STM32 MCU's.
The bus drivers are as follows..
I8080
RGB
SPI
DSI
I2C
depending on options that are passed to the function that creates the bus is what handles the number of lanes being used.
I have found some examples on GitHub but they are all compile time and use a lot of macros to handle bit shifting and I am not able to easily make heads or tails of what is going on in the code.
If there is someone willing to help me out with this it would be greatly appreciated.
Here is a link to the repository
https://github.com/lvgl-micropython/lvgl_micropython
2025-07-23 5:19 AM
Help for your STM32 project is available here.