2021-09-13 04:56 AM
I'd like to use the Portenta H7 to drive a display over the USB C DisplayPort interface.
The example provided in the Arduino library uses RGB565 for the input image, and looking at the associated code (specifically stm32_LCD_DrawImage() in anx7625.cpp), I see that the output mode is also hardcoded to RGB565. However looking at the STM32H7 HAL User Manual it would appear that RBG888 (and some other modes) are also available.
Is it possible to drive the display at RGB888 with the Portenta? This is for an art project, so full color depth is important. If I can make this work, then the Portenta becomes a great platform for generative animations and other artworks that can be simply plugged in to a USB-C DisplayPort capable monitor or projector and run without the fuss of a 'full computer'!
2021-09-13 10:19 AM
UPDATE: I've just tried changing anx7625.cpp from the Arduino library to use RGB888 and it works! (at least, I've managed to turn a bunch of pixels blue). In fact it also eliminates the weird widely spaced vertical white lines that I was going to blame on my USB hub.
> dma2d.Init.ColorMode = DMA2D_OUTPUT_RGB888;
Looks like full steam ahead! If anyone can point me in the direction of any documentation or advice for using the HAL_DMA2D API that would be great, though I reckon I can probably figure much of it out from the Arduino example. Really I'm just wanting to low level paint pixels at hopefully ~20fps, 1080p, RGB888.
2021-09-13 10:44 AM
UPDATE: Spoke too soon. I wasn't compiling in the change, so no effect. The white lines have come back too.