Repository navigation
displayif: mipidsi drives MIPI DSI panels on the STM32H747 - #265
Merged
Merged
Conversation
On the H747 and H757, mipidsi now drives the chip's DSI host in video burst mode, fed by the LTDC scanning an RGB565 framebuffer from the MicroPython heap, with the same Bus and Display interface as on esp32. refresh(), blit() and fill_rect() write the CPU's dirty cache lines back to the memory the LTDC reads. The pixel clock comes from PLL3's R divider alone, put back on deinit and soft reset, so SPI1/2/3 keep their clock. Other stm32 chips keep the stub. The board has to enable the HAL's DSI and LTDC drivers. Tested on an Arduino GIGA R1 WiFi with the GIGA Display Shield (480x800 ST7701S, two lanes at 500 Mbit/s, 40 MHz pixel clock): colour bars, then LVGL through displaydev's FBDisplay with the shield's GT911 touch, 60 s with no errors.
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the STM32H747 and H757,
mipidsiis real now instead of a stub.Busstarts the DSI host's PLL and PHY;Displaysets up video burst mode, starts the LTDC scanning an RGB565 framebuffer from the MicroPython heap, and sends the panel's init sequence, with the same keyword arguments as the esp32 module, so a board config reads the same and displaydev's FBDisplay drives it. The LTDC reads the framebuffer continuously, sorefresh(),blit()andfill_rect()only write the CPU's dirty cache lines back. The pixel clock is set with PLL3's R divider alone, so SPI1/2/3 keep their clock; the ADC's, also PLL3 R, follows the pixel clock while a display is up, and deinit and soft reset put the divider back. The board has to enable the HAL's DSI and LTDC drivers; the port notes say how, and the GIGA R1 variant in #266 does it.mipidsi.pyiis new: a stub for the module on both ports, marking what only one of them has.Tested on an Arduino GIGA R1 WiFi with the GIGA Display Shield (480x800 ST7701S, two lanes at 500 Mbit/s, 40 MHz pixel clock). Register reads while it ran showed the DSI PLL locked, no DSI errors and no LTDC underruns. Eight colour bars filled in 5 ms, and then LVGL ran through FBDisplay with the shield's GT911 touch for 60 s: app.service fired 5776 times, refresh 1752, LVGL 5314, with no timer errors and a longest gap of 30 ms.
Not tested: a second panel, one data lane,
deinit()followed by a newDisplay, and the H757.