Download Print this page

ST STM32L4+ Series Reference Manual page 900

Hide thumbs Also See for STM32L4+ Series:

Advertisement

LCD-TFT display controller (LTDC)
Layer blending
The blending is always active and the two layers can be blended following the blending
factors configured through the LTDC_LxBFCR register.
The blending order is fixed and it is bottom up. If two layers are enabled, first the Layer1 is
blended with the Background color, then the layer2 is blended with the result of blended
color of layer1 and the background. Refer to the figure below.
Layer2
Layer1
BG
Default color
Every layer can have a default color in the format ARGB which is used outside the defined
layer window or when a layer is disabled.
The default color is configured through the LTDC_LxDCCR register.
The blending is always performed between the two layers even when a layer is disabled. To
avoid displaying the default color when a layer is disabled, keep the blending factors of this
layer in the LTDC_LxBFCR register to their reset value.
Color keying
A color key (RGB) can be configured to be representative for a transparent pixel.
If the color keying is enabled, the current pixels (after format conversion and before CLUT
respectively blending) are compared to the color key. If they match for the programmed
RGB value, all channels (ARGB) of that pixel are set to 0.
The color key value can be configured and used at run-time to replace the pixel RGB value.
The color keying is enabled through the LTDC_LxCKCR register.
The color keying is configured through the LTDC_LxCKCR register. The programmed value
depends on the pixel format as it is compared to current pixel after pixel format conversion
to ARGB888.
Example: if the a mid-yellow color (50 % red + 50 % green) is used as the transparent color
key:
In RGB565, the mid-yellow color is 0x8400. Set the LTDC_LxCKCR to 0x848200.
In ARGB8888, the mid-yellow color is 0x808000. Set LTDC_LxCKCR to 0x808000.
In all CLUT-based color modes (L8, AL88, AL44), set one of the palette entry to the
mid-yellow color 0x808000 and set the LTDC_LxCKCR to 0x808000.
900/2301
Figure 202. Blending two layers with background
Layer2
Layer1 + BG
RM0432 Rev 6
RM0432
Layer2 +
Layer1 + BG
MSv48123V1

Advertisement

loading
Need help?

Need help?

Do you have a question about the STM32L4+ Series and is the answer not in the manual?

Subscribe to Our Youtube Channel