Skip to main content
slime
Associate II
March 13, 2022
Question

The STM32L4R9 Discovery kit it comes with a small round (390x390) DSI based display. I am trying to setup a standard rectangular DSI based display. All the example projects for STM32L4R9xx use a round display using GFXMMU look-up table ...

  • March 13, 2022
  • 4 replies
  • 1506 views

Since I don't have a round display, I don't need this lookup table to convert the bit locations, but there is no obvious way to not use it. How do you bypass this GFXMMU look-up table method and just send the raw image array to the DSI path? I am using this project for testing:

https://github.com/STMicroelectronics/STM32CubeL4/tree/master/Projects/32L4R9IDISCOVERY/Examples/DSI/DSI_CmdMode_SingleBuffer

This topic has been closed for replies.

4 replies

MM..1
Super User
March 13, 2022

As first you need check how mode your DSI display support. Some rect displays dont support command mode . Video mode is supported on all and is good point to start, and too is better MCU offload .

slime
slimeAuthor
Associate II
March 13, 2022

The screen supports command mode. Sending an image works, its just being modified (has a circle boarder).

Tignac
Visitor II
March 13, 2022

as you don't have a round display you probably don't need to go through GFXMMU.

You should define your layer address directly to be the physical frame buffer

#define LAYER_ADDRESS (uint32_t) PhysFrameBuffer

And update the LayerCfg.ImageWidth to the effective size of your display (when you are using the GFXMMU the ImageWidth must be set to 1024)

slime
slimeAuthor
Associate II
March 13, 2022

Thank you. Your suggestion worked.

  • #define LAYER_ADDRESS (uint32_t) PhysFrameBuffer
  • Increasing the PhysFrameBuffer size as needed for the display size
  • Removing the usage of 1024 in LTDC config, and in the CopyInVirtualBuffer()
  • Dma2dHandle.Init.Mode  = DMA2D_M2M;

The only thing that isn't correct yet is the colors are off; red is cyan, blue is yellow, and green is pink.