38.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:

XFACTOR1st=floor(8×256×XMEMSIZE256×XPHIDEFXSIZE)
XFACTOR1st=XFACTOR1st+1
XMEMSIZEmax=floor(XFACTOR1st×XSIZE+256×XPHIDEF2048)
{XFACTOR=XFACTOR1st1when(XMEMSIZEmax>XMEMSIZE)XFACTOR=XFACTOR1stotherwise