39.6.9.2 Horizontal Scaler

The XMEMSIZE field of the LCDC_HEOCFG4 register indicates the horizontal size minus one of the image in the system memory. The XSIZE field of the LCDC_HEOCFG3 register contains the horizontal size minus one of the window. The SCALEN bit of the LCDC_HEOCFG13 register is set to ‘1’. The scaling factor is programmed in the XFACTOR field of the LCDC_HEOCFG13 register. Use the following algorithm to find the XFACTOR value:

XFACTO R 1 st = floor 8 × 256 × XMEMSIZE 256 × XPHIDEF XSIZE
XFACTO R 1 st = XFACTO R 1 st + 1
XME MSIZE max = floor XFACTO R 1 st × XSIZE + 256 × XPHIDEF 2048
XFACTOR = XFACTO R 1 st 1 when XME MSIZE max > XMEMSIZE XFACTOR = XFACTO R 1 st otherwise