Always some lines in my screen

I am not sure if this is a bug or not.
I changed my hardware LCD. Always some lines in my screen.

What is wrong?
Anybody could share me some method to fix it?

What MCU are you using? If it’s STM32F7/H7, do you have the cache enabled?

I use a STM32F103VC.
I am not sure it’s the MCU have a cache or not.

The F1 does not have cache.

Are you using DMA or DMA2D to send the screen buffers, or copying them directly to the display?

Thank you very much.
Actually, I use a FSMC to copy the cmd and data to display.
And I find that the lines distance equal to the buffer size in “lv_port_disp.c”
//============================================================

    */* Example for 2) */*
  •    static lv_disp_buf_t disp_buf_2;*
    
  •    static lv_color_t buf2_1[LV_HOR_RES_MAX * 10];                        /*A buffer for 10 rows*/*
    
  •    static lv_color_t buf2_2[LV_HOR_RES_MAX * 10];                        /*An other buffer for 10 rows*/*
    
  •    lv_disp_buf_init(&disp_buf_2, buf2_1, buf2_2, LV_HOR_RES_MAX * 10);   /*Initialize the display buffer*/*
    

//============================================================

when I modified the “*10” to “*15”, the distance will be 15 pixs.

2 things:

  1. Maybe you need to copy an extra row/column in disp_flush?
  2. This is unrelated to your original issue, but did you change the color scheme of that example? It’s supposed to be blue at the top, not yellow. Maybe you need to enable LV_COLOR_16_SWAP if you’re using 16bpp color?
1 Like

Thank you very much.
The lines will disappear when I delete the obj, not reset the hardware.
And when I try other example, the screen will display correct.
It’s strange.

  1. I don’t think the MCU need a extra row/column copy. Because, some times the screen will display correct.
  2. I have try the style, so the color was modified by me. It’s the right color. Thank you.
    excuse my bad picture, the screen display correct without lines in the pic.