2021-11-28 09:19 AM
Hi guys,
I want to do a dma with HAL library for a 1.3 inch st7798 driver display (uses stm32l476rg mcu)
https://github.com/Floyd-Fish/ST7789-STM32
I used the library in it works fine. but I want the screen to run faster (no scans should appear on the screen).
I made some changes in the st7789 library:
I set dma for spi2 from cube mx
I changed the HAL_SPI_Transmit() functions to HAL_SPI_Transmit_DMA() in the st7789.c file. Data was sent from dma, but there is a shift and color problem in the image on the screen. How can I solve this problem? thanks.
2023-02-24 12:42 PM
Hello!! I'm having the same issue, did you found any fix?
2024-06-28 01:12 AM
Hi @Bicer @Gde S.3 , this post might be a bit older, but I think it could still be helpful for others.
Have you verified that the SPI transfer rate is the maximum supported by the driver (15 MHz)? Using DMA will not significantly improve performance because the same (slow) communication bus is still being used, that is the bottleneck.
Regarding DMA, I using the middleware provided by MX and I have to put this two line at the and of ST7789V_Init() to reverse color.
// Display inversion ON
reg = ST7789V_DINVON;
ret += st7789v_write_reg(&pObj->Ctx, ®, 1);
Otherwise color shifting can indicate a byte alignment issue during transmission.
Reminder: In RGB565 format, each pixel is composed of 2 bytes (5 bits red, 6 bits green, 5 bits blue). Ensure the correct order of these bits for accurate color representation.
Regards
2024-07-21 04:55 AM
Hi, What do you recommend to use to improve the speed of transfer so that no scans appear? I have used the max SPI transfer rate but its still too slow or I am missing something?
2024-07-22 11:55 PM
Hi @Sarim-Jalil
It's likely that you're not doing anything wrong, the SPI is just slow by nature. You can perform a signal check using a logic analyzer to see if the data is being transferred without interruptions.