Important: unclear posts may not receive useful answers.
OK
Before posting
- Get familiar with Markdown to format and structure your post
- Be sure to update lvgl from the latest version from the
master
branch.- Read the
Delete this section if you read and applied the mentioned points.
Description
All the codes were debugged and there wasn’t any error.
Now I add two sentences of code below, and I get an error message.
lv_disp_t * disp;
lv_disp_drv_register(&disp_drv); /Finally register the driver/
The error I get is at below:
BSP_CFG_HANDLE_UNRECOVERABLE_ERROR(0)
I think the display isn’t registered to a driver.
What MCU/Processor/Board and compiler are you using?
Renesas EK-RA4M2
What do you want to achieve?
I want to register a display to a driver.
What have you tried so far?
I tried to print if disp variable is NULL by ur_print() but i didn’t get any log.
if(disp = lv_disp_drv_register(&disp_drv) == NULL){
uart_print("Failure");
}else{
uart_print("Success");
}
I’m using LGVL ver 8.3.5.
Code to reproduce
Add the relevant code snippets here.
The code block(s) should be between ```c
and ```
tags:
/*You code here*/
* main() is generated by the RA Configuration editor and is used to generate threads if an RTOS is used. This function
* is called by main() when no RTOS is used.
**********************************************************************************************************************/
void hal_entry(void)
{
/* TODO: add your own code here */
Device_Init();
//*** LVGL INIT & CONFIG ***/
lv_init();
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
lv_disp_draw_buf_init(&disp_buf, buf_1, NULL, SSD1327_BUFFERSIZE );
/*Initialize `disp_buf` with the buffer(s). With only one buffer use NULL instead buf_2 */
disp_drv.draw_buf = &disp_buf; /*Set an initialized buffer*/
disp_drv.flush_cb = user_flush_cb; /*Set a flush callback to draw to the display*/
disp_drv.hor_res = SSD1327_LCDWIDTH; /*Set the horizontal resolution of the display*/
disp_drv.ver_res = SSD1327_LCDHEIGHT; /*Set the vertical resolution of the display*/
lv_disp_t * disp;
lv_disp_drv_register(&disp_drv); /*Finally register the driver*/
#if 0
if(disp = lv_disp_drv_register(&disp_drv) == NULL){
uart_print("드라이버 등록 실패");
}else{
uart_print("디스플레이 드라이브 등록 성공");
}
#endif
Data cur_data = {0, 0};
Data data_history[MAX_HISTORY_SIZE];
int num_total = 1;
int num_for_avg = 0;
int last_data_index = 0;
Data avg_data = {0, 0};
int timeout = 0;
while (1) {
if(++timeout == 100) {
timeout = 0;
//Need to send data to PC using UART
DHT11_Read (&cur_data.temperature, &cur_data.humidity);
save_data(cur_data, data_history, &last_data_index, &num_for_avg );
avg_data = get_average(data_history, num_for_avg);
UART_print(num_total, cur_data, avg_data);
alert(avg_data);
num_total++;
delay_ms(1000); // Update every 1 seconds
}
lv_task_handler();
lv_tick_inc(10);
delay_ms(10);
}
#if BSP_TZ_SECURE_BUILD
/* Enter non-secure code */
R_BSP_NonSecureEnter();
#endif
}
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.