cancel
Showing results for 
Search instead for 
Did you mean: 

Can you explain the meaning of scanline and why 533

PKunK.1
Associate III

void LCD_ReqTear(void)

  {

    static uint8_t ScanLineParams[2];

    uint16_t scanline = 533;

    ScanLineParams[0] = scanline >> 8;

    ScanLineParams[1] = scanline & 0x00FF;

    HAL_DSI_LongWrite(&hdsi, 0, DSI_DCS_LONG_PKT_WRITE, 2, 0x44, ScanLineParams);  // /* Write Tearing Effect Scan line command */

    // set_tear_on

    HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x35, 0x00); // /* Tearing Effect Line On command : command with 1 parameter 'TELOM' */

  }

The above source is generated by the stm32f469i_discoveryTouchGFX proram.

What I am curious about is the meaning of "scanline" and why it has 533 values.

The stm32f469i_discovery lcd is 800 *480. Is it related to 480?

If it is related to 480 I want to know how 533 comes out.

LTDC->AWCR = ((WIDTH + 2) << 16) | 0x1E2; //

LTDC->TWCR = ((WIDTH + 2 + 1) << 16) | 0x1E3;

LTDC_Layer1->WHPCR = ((WIDTH + 2) << 16) | 3;

LTDC_Layer1->CFBLR = (((832 * 2) << 16) | ((WIDTH * 2) + 3));

In addition, if there is any data that can understand the calculation process and meaning of AWCR, TWCR, WHPCR, CFBLR in LTDC, it would be appreciated if you could tell me which information to see

2 REPLIES 2
Amel NASRI
ST Employee

Hi @PKunK.1​ ,

You find an explanation regarding the tearing effect setup in the application note AN4860 (DSI Host on STM32F469/479, STM32F7x8/x9 and STM32L4R9/S9 MCUs).

Based on the explanation provided there: here you define the scanline at which the TE reporting should happen.

Regarding the various LTDC registers or bitfields: you need to refer to AN4861 (LCD-TFT display controller (LTDC) on STM32 MCUs).

  • AWCR and TWCR are used as LTDC timing registers
  • WHPCR: LTDC layerx window horizontal position configuration register
  • CFBLR: register to configure color framebuffer length & pitch

-Amel

Hope my answer helped you, when your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Go look at the Vertical line totals, ie front and back porches, sync, and visible lines.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..