Nothing shows up

You have removed the

disp_drv.flush_cb = LCD_flush;		

It is necessary in any case. Without that line it is clear that your flush function is not called.

I see, you have the test code with direct call of LCD_flush.
It will not work as expected because you do not provide an array of colors, only a single color.
You are setting the pointer variable color to address 0xb3fd.
If you want to do a simple (fake) test:

uint16_t color;
color = 0x3456;
LCD_flush (&disp_drv, &area, &color);

AND in LCD_flush uncomment the line with color_map++;
So in this case only one color is written to the specified area.

But that’s only a quick test, to see whether the way from LCD_flush to display is working.
Don’t forget to remove this code.

I think you have to much changed back and forth, so there is a litte confusion within your code.

I don’t see where you create some lvgl object (e.g. simple Hello Word) for the display.

Sorry for that I changed a lot for debugging.
I’ve checked your reply today, and I appreciate your help.

After trying what you suggested, I’m sure that my LCD_flush() doesn’t work :sweat_smile:

I put an example in lvgl lib, but I deleted it because I wanted to solve the initialization problem first.

I’m wondering if the display changes the color with 0x3456 when I write like you suggested.
I’m not sure the function is working.

disp_drv.flush_cb = LCD_flush;	

In this line, it just sets the flush_cb structure’s value.
Should I put the object creation line if I want to check the configuration code working?
I thought it is optional and I put it in lines, there is no change, it created nothing and made hard fault error. That’s why I deleted the example(create obj) and tried to solve the configuration problem first.

Okay, I’m trying to change my LCD_flush function, now I solved a few problem.
First of all, the color value wasn’t reflected in LCD_flush.
That’s because I set 3rd parameter of LCD_flush() as a pointer value of color_map.
Instead of that, I changed it to get the real value contained in the address.

Former LCD_flush

void LCD_flush(lv_disp_drv_t * drv, const lv_area_t * area,  lv_color_t * color_map)
{
	uint16_t x, y;
	uint32_t size = (area->x2 - area->x1 + 1) * (area->y2 - area->y1 + 1);
    for(y = area->y1; y <= area->y2; y++) {
        for(x = area->x1; x <= area->x2; x++) {
        	LCD_DrawPaint((uint16_t ) area->x1, (uint16_t ) area->y1, (uint16_t *)color_map);
        	color_map++;
        }
    }
	lv_disp_flush_ready(drv);
	DEV_Digital_Write(DEV_CS_PIN, 1);
}

Revised

void LCD_flush(lv_disp_drv_t * drv, const lv_area_t * area,  lv_color_t * color_map)
{
	//DEV_Digital_Write(DEV_DC_PIN, 1);
	lv_color_t color = *color_map;
	 LCD_DrawPaint(area->x2, area->y2, (uint16_t)color.full);
	lv_disp_flush_ready(drv);
	DEV_Digital_Write(DEV_CS_PIN, 1);
}
void LCD_DrawPaint(uint16_t x, uint16_t y, uint16_t Color)
{
	LCD_SetCursor(x, y);
	LCD_WriteData_Word(Color);
}

After that, I can watch the specific pixel (the coordinate x2 = 52, y2 = 43, that I set in App_Start()) color is changed.
This is only effective when I put the test line.
I set the specific color and area and called the LCD_flush.
nothing is changed when I delete LCD_flush(&disp_drv, &area, &my_color); line.

int lv_config_main(void)
{
    static lv_disp_draw_buf_t disp_buf;
    static lv_color_t buf_1[LV_HOR_RES_MAX*10];
    //static lv_color_t buf_2[LV_HOR_RES_MAX * 10];
    lv_disp_draw_buf_init(&disp_buf, buf_1, NULL, LV_HOR_RES_MAX * 10);

    lv_disp_drv_t disp_drv;
    lv_disp_drv_init(&disp_drv);
    disp_drv.draw_buf = &disp_buf;	

	lv_area_t area;
	lv_color_t my_color;
	my_color.ch.red = (uint16_t)0x06;
	my_color.ch.green_h = (uint16_t)0x06;
	my_color.ch.green_l = (uint16_t)0x03;
	my_color.ch.blue = (uint16_t)0x08;

	area.x1 = 0;
	area.y1 = 0;
	area.x2 = 52;
	area.y2 = 43;

	LCD_flush(&disp_drv, &area, &my_color);

    disp_drv.flush_cb = LCD_flush;
    lv_disp_t * disp_ex;
    disp_ex = lv_disp_drv_register(&disp_drv);

}

I guess it is big progress, there are still a lot of problems to be solved, though. :sweat_smile: