Description
I create a chart with 1000 points in my display, I add a cursor to the chart, and when the cursor moves through the chart continuously by the timer, after a while glitch occurs in my display.
when I place the LCD buffer(1280*400) in the SDRAM this problem happens but when I use stm32 RAM instead of the SDRAM, there is no problem.
I think this problem is not related to the SDRAM config because it happens only when the chart is displayed.
What MCU/Processor/Board and compiler are you using?
STM32H7A3
What LVGL version are you using?
V8.7
What do you want to achieve?
What have you tried so far?
Code to reproduce
The code block(s) should be formatted like:
/*
void create_main_screen(void){
clear_screen();
create_main_frame();
init_objects_styles();
create_test_chart();
lv_timer_t *lvgl_timer_test_chart = lv_timer_create(lvgl_timer_test_chart_callback, 300, NULL);
}
static void create_test_chart()
{
test_chart = lv_chart_create(obj_mid_bar);
lv_obj_set_size(test_chart, 1100, 250);
lv_obj_align(test_chart, LV_ALIGN_CENTER, 0, 10);
lv_obj_add_style(test_chart, &style_trend_chart_bg, LV_PART_MAIN);
lv_obj_add_style(test_chart, &style_trend_chart_ticks, LV_PART_TICKS);
lv_obj_add_style(test_chart, &style_trend_chart_cursor, LV_PART_CURSOR);
lv_chart_set_type(test_chart, LV_CHART_TYPE_LINE);
lv_chart_set_update_mode(test_chart, LV_CHART_UPDATE_MODE_CIRCULAR);
lv_chart_set_div_line_count(test_chart, 0, 0);
lv_chart_set_point_count(test_chart, 1000);
lv_obj_add_style(test_chart, &style_trend_chart_bg, LV_PART_MAIN);
lv_obj_add_style(test_chart, &style_trend_chart_ticks, LV_PART_TICKS);
lv_obj_add_style(test_chart, &style_trend_chart_cursor, LV_PART_CURSOR);
test_chart_series = lv_chart_add_series(test_chart,
lv_color_make(0, 180, 230), LV_CHART_AXIS_PRIMARY_Y);
lv_chart_set_range(test_chart, LV_CHART_AXIS_PRIMARY_Y,
SPO2_MIN_LOWERBOUND, 300);
lv_chart_set_all_value(test_chart, test_chart_series,
SPO2_MIN_LOWERBOUND);
lv_chart_set_axis_tick(test_chart, LV_CHART_AXIS_PRIMARY_Y, 15, 10, 6,
5,
true, 45);
test_chart_cursor = lv_chart_add_cursor(test_chart, lv_color_white(),
LV_DIR_VER);
trend_hidden_serires[1] = lv_chart_add_series(test_chart,
lv_color_black(), LV_CHART_AXIS_PRIMARY_Y
);
lv_chart_set_cursor_point(test_chart, test_chart_cursor,
trend_hidden_serires[1], 0);
for(uint16_t i=0;i<1000;i++){
test_chart_series->y_points [i] = i % 150;
}
lv_chart_refresh(test_chart);
}
static void lvgl_timer_test_chart_callback(struct _lv_timer_t *timer){
static uint16_t cnt23 = 0;
static uint16_t id_plus = 0;
if(cnt23++<1000){
id_plus++;
}else if(cnt23++>1000){
id_plus--;
cnt23 = 0;
}
lv_chart_set_cursor_point(test_chart, test_chart_cursor, test_chart_series, id_plus);
}
*/
Screenshot and/or video
glitch.zip (2.6 MB)