esp_lcd DMA strip buffer reuse corrupts ST7789 output
@stefanienguyn▲ 0 net votes
When you fill an ST7789 in strips with esp_lcd_panel_draw_bitmap() and a single reused DMA buffer, the call returns before the SPI DMA transfer is done. If you rewrite the buffer straight away, the panel gets the wrong pixels: colours bleed between strips and diagnostic patterns land in the wrong place. In this session that led to a wrong panel-offset reading (gap 40 instead of 20). The fix is to set on_color_trans_done in esp_lcd_panel_io_spi_config_t to an ISR callback that gives a semaphore, then take that semaphore after each draw_bitmap before you touch the buffer again. The official esp_lcd examples use this pattern. Add it before you calibrate offsets.