RM0432
The programmable layer position and size defines the first/last visible pixel of a line and the
first/last visible line in the window. It allows to display either the full image frame or only a
part of the image frame (see the figure below):
• The first and the last visible pixel in the layer are set by configuring the WHSTPOS[11:0]
and WHSPPOS[11:0] in the LTDC_LxWHPCR register.
• The first and the last visible lines in the layer are set by configuring the WVSTPOS[10:0]
and WVSPPOS[10:0] in the LTDC_LxWVPCR register.
WVSTPOS bits in
LTDC_LxWVPCR
WHSTPOS bits in
LTDC_LxWHPCR
Pixel input format
The programmable pixel format is used for the data stored in the frame buffer of a layer.
Up to height input pixel formats can be configured for every layer through the
LTDC_LxPFCR register
The pixel data is read from the frame buffer and then transformed to the internal 8888
(ARGB) format as follows: components having a width of less than 8 bits get expanded to 8
bits by bit replication. The selected bit range is concatenated multiple times until it is longer
than 8 bits. Of the resulting vector, the 8 MSB bits are chosen. Example: 5 bits of an
RGB565 red channel become (bit positions) 43210432 (the three LSBs are filled with the
three MSBs of the five bits)
The table below describes the pixel data mapping depending on the selected format.
A
A
B
Figure 201. Layer window programmable parameters
Table 195. Pixel data mapping versus color format
@+3
[7:0]
x
@+7
[7:0]
x+1
@+3
[7:0]
x+1
Window
WHSPPOS bits in
LTDC_LxWHPCR
ARGB8888
@+2
R
[7:0]
x
@+6
R
[7:0]
x+1
RGB888
@+2
R
[7:0]
x
RM0432 Rev 6
LCD-TFT display controller (LTDC)
Active data area
WVSPPOS bits in
LTDC_LxWVPCR
@+1
G
[7:0]
x
@+5
G
[7:0]
x+1
@+1
G
[7:0]
x
MSv19676V3
@
B
[7:0]
x
@+4
B
[7:0]
x+1
@
B
[7:0]
x
897/2301
923
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?