Description
Hello. I am porting the library to the board STM32_F4VE. But the display shows a white screen only.
I have a simple configuration using FSMC. No DMA for now.
Seems to me that I just need to conf an aspect. But I do not find my error, any help will be grateful,
Thanks,
Note:
The initialization fo the display works. (video attached)
These functions have been configured according to the description.
1 Initialization of the Display
2 disp_flush (including all the aspects of the file called lv_port_disp.c)
3 lv_tick_inc(1);
What MCU/Processor/Board and compiler are you using?
STM32F407VET
What LVGL version are you using?
7.4.0
What do you want to achieve?
What have you tried so far?
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
void lv_port_disp_init(void)
{
disp_init();
static lv_disp_buf_t disp_buf_1;
static lv_color_t buf1_1[LV_HOR_RES_MAX * 10]; /*A buffer for 10 rows*/
lv_disp_buf_init(&disp_buf_1, buf1_1, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/
lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
/*Set the resolution of the display*/
disp_drv.hor_res = 320;
disp_drv.ver_res = 240;
/*Used to copy the buffer's content to the display*/
disp_drv.flush_cb = disp_flush;
/*Set a display buffer*/
disp_drv.buffer = &disp_buf_1;
/*Finally register the driver*/
lv_disp_drv_register(&disp_drv);
}
static void disp_init(void)
{
TFT_Init(TFT_HORIZONTAL1, GREEN);
}
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
{
TFT_Box( area->x1, area->y1, area->x2,area->y2, color_p->full);
lv_disp_flush_ready(disp_drv);
}
//=================================================================
// File Called file lv_conf.h
#define LV_HOR_RES_MAX (320)
#define LV_VER_RES_MAX (240)
#define LV_COLOR_DEPTH 16
/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
# define LV_MEM_SIZE (32U * 1024U)
#define LV_USE_GPU 0
//=========================================================
// The interruption for 1ms
void SysTick_Handler(void)
{
HAL_IncTick();
HAL_SYSTICK_IRQHandler();
lv_tick_inc(1);
}
//====================================================
// My Hello World
lv_init();
lv_port_disp_init();
lv_obj_t * scr = lv_disp_get_scr_act(NULL);
lv_obj_t * label1 = lv_label_create(scr, NULL);
lv_label_set_text(label1, "Hello world!");
lv_obj_align(label1, NULL, LV_ALIGN_CENTER, 0, 0);
while (1)
{
HAL_Delay(10);
lv_task_handler();
}
Screenshot and/or video
Video.
https://drive.google.com/file/d/1noFCo9G6MxqaRpTujWlJqpXCn2BuMeuP/view?usp=sharing