-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange artifacts on the ILI9488 display #116
Comments
After consistently downgrading the |
Hello again :) Meanwhile to your other questions: I can see from your activity on GitHub that you really want to make LVGL happen in your projects, I'm sorry that it is not in a state that would enable you to use full potential of LVGL (and ESPs). We are currently working on making this better. Looking forward to hearing from you, |
After I managed to solve the problem with the touchscreen, I decided to try the fresh version I am in complete despair, confusion and upset feelings. |
@SinglWolf From the picture it appears the artifacts are static? I think I see some on my display as well. I also see artifacts that appear and disappear. Do you see those as well, or just these static pixels? Perhaps I can help debug on my display to help? |
Artifacts are static if the object is static, because the wrong pixels are always on the right vertical edge of the object. Show a screenshot of your own display showing the artifacts yourself. I'll say it or not. |
I was able to completely get rid of the artifacts on the display screen with the void disp_spi_add_device(spi_host_device_t host)
{
gpio_num_t cs;
gpio_get_lcd(&cs, NULL, NULL);
ESP_LOGI(TAG, "Adding SPI device");
ESP_LOGI(TAG, "Clock speed: %dHz, mode: %d, CS pin: %d",
SPI_TFT_CLOCK_SPEED_HZ, SPI_TFT_SPI_MODE, cs);
spi_device_interface_config_t devcfg_disp = {
.clock_speed_hz = SPI_TFT_CLOCK_SPEED_HZ,
.mode = 0,
.spics_io_num = cs, // CS pin
.queue_size = 1,
.post_cb = spi_ready,
.flags = SPI_DEVICE_NO_DUMMY | SPI_DEVICE_HALFDUPLEX,
};
// Attach the LCD to the SPI bus
esp_err_t ret = spi_bus_add_device(host, &devcfg_disp, &spi_disp);
assert(ret == ESP_OK);
}
void tp_spi_add_device(spi_host_device_t host)
{
gpio_num_t t_cs;
esp_err_t ret = gpio_get_touch(&t_cs, NULL);
if (t_cs == GPIO_NONE)
return;
gpio_config_t cs_config = {
.pin_bit_mask = BIT64(t_cs),
.mode = GPIO_MODE_OUTPUT,
.pull_up_en = GPIO_PULLUP_DISABLE,
.pull_down_en = GPIO_PULLDOWN_DISABLE,
.intr_type = GPIO_INTR_DISABLE,
};
ret = gpio_config(&cs_config);
assert(ret == ESP_OK);
spi_device_interface_config_t devcfg_touch = {
.command_bits = 8,
.clock_speed_hz = 2000000,
.mode = 0,
.spics_io_num = t_cs,
.queue_size = 1,
.pre_cb = NULL,
.post_cb = NULL,
};
// Attach the Touch to the SPI bus
ret = spi_bus_add_device(host, &devcfg_touch, &spi_touch);
assert(ret == ESP_OK);
}
void disp_spi_send_data(uint8_t *data, uint16_t length)
{
if (length == 0)
return;
while (spi_trans_in_progress)
;
memset(&transaction, 0, sizeof(transaction));
transaction.length = length * 8; // transaction length is in bits
transaction.tx_buffer = data;
spi_trans_in_progress = true;
spi_color_sent = false;
ESP_ERROR_CHECK(spi_device_queue_trans(spi_disp, &transaction, portMAX_DELAY));
}
void disp_spi_send_colors(uint8_t *data, uint16_t length)
{
if (length == 0)
return;
while (spi_trans_in_progress)
;
memset(&transaction, 0, sizeof(transaction));
transaction.length = length * 8; // transaction length is in bits
transaction.tx_buffer = data;
spi_trans_in_progress = true;
spi_color_sent = true;
ESP_ERROR_CHECK(spi_device_queue_trans(spi_disp, &transaction, portMAX_DELAY));
}
uint16_t tp_spi_xchg_xpt(uint8_t writeData)
{
while (spi_trans_in_progress)
;
uint8_t data_recv[2] = {0, 0};
uint16_t data_send = 0;
memset(&transaction, 0, sizeof(transaction));
transaction.cmd = writeData;
transaction.length = 16; // length is in bits
transaction.tx_buffer = &data_send;
transaction.rx_buffer = &data_recv;
ESP_ERROR_CHECK(spi_device_queue_trans(spi_touch, &transaction, portMAX_DELAY));
spi_transaction_t *rt;
ESP_ERROR_CHECK(spi_device_get_trans_result(spi_touch, &rt, portMAX_DELAY));
return (uint16_t)(data_recv[0]) << 8 | (uint16_t)(data_recv[1]);
}
void disp_tp_spi_finished()
{
while (spi_trans_in_progress)
;
}
/**********************
* STATIC FUNCTIONS
**********************/
static void IRAM_ATTR spi_ready(spi_transaction_t *trans)
{
if (spi_color_sent)
{
spi_color_sent = false;
spi_trans_in_progress = false;
lv_disp_t *disp = NULL;
disp = _lv_refr_get_disp_refreshing();
lv_disp_flush_ready(disp->driver);
}
else
{
spi_trans_in_progress = false;
}
} |
It is unfortunate that the problem of artifacts on the display screen is of no interest to anyone. |
I've encoutered the same issue (with artifacts). I think the artifacts are there, because the last pixel of the buffer didnt get one of the bytes of color sent.
|
I already broken my head over this problem.
Strange vertical stripes appeared on the display.
Explain, please, did I broken something in the settings, or is it a sign of the imminent demise of the display?
ESP32-S2
device,ILI9488
display, VScode + PlatformIO environment, Windows 10 system. Environment components are the freshest.I just don't remember when (under which version of
lvgl_esp32_drivers
or frameworkesp-idf
) there were no artifacts, there was a big break in working with the project.I can't roll back, I would have known that there would be such a problem - I would have made a commit.
The text was updated successfully, but these errors were encountered: