2021-10-19 04:07 AM
As per the question I'm trying to run a ILI9163c based display on the NUCLEO-F446RE. I'm using this library: (https://github.com/Spirit532/ILI9163C_STM32_HAL_DMA). My questions are:
void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi) {
SPI_DMA_CNT--;
if(SPI_DMA_CNT == 0) {
HAL_SPI_DMAStop(&hspi1);
SPI_DMA_CNT = 1;
SPI_DMA_FL = 1;
}
}
This question is a bit of a mess. I'm sorry. I don't know how to present the questions in a clearer way; largely because I don't know what information is relevant and what is not.
Thanks.
Solved! Go to Solution.
2021-10-20 09:12 AM
So I think I figured out part of the reason why changing the CLK was causing issues. I was under the impression that SPI was blocking i.e. it would just busy wait until it was finished transmitting...However, it appears that by increasing the clock frequency it was causing the CS (chip select) line to go high before the SPI transmission was complete. Adding an asm("nop") before driving the CS line high seems to have fixed the issue.
2021-10-19 08:30 AM
As first with display you need choice mode of operation. Full screen refresh or only changes ( if LCD have own framebuffer)
After this calculate for desired framerate amount of data, for example RGB888 over SPI on 60Hz 640x480 == 55MB/s in serial x8 = 443MHz SPI
As you can see this is over normal SPI. ... But this is only example.
And CNT is for block prepare in time when HALF buffer complete interrupt is used.
2021-10-19 09:18 PM
Hi,
Thanks
2021-10-20 01:50 AM
2021-10-20 03:09 AM
Ah yeah I messed up my bits and bytes. But I still can't see how you got 55MB/s. Can you explain how you got that value?
2021-10-20 08:54 AM
RGB888 is three byte per pixel then 640x480x3X60 is bytes per sec try use calc on my is 55296000
2021-10-20 09:06 AM
Got it. I didn't realize it was 3 bytes per pixel :D Thanks
2021-10-20 09:12 AM
So I think I figured out part of the reason why changing the CLK was causing issues. I was under the impression that SPI was blocking i.e. it would just busy wait until it was finished transmitting...However, it appears that by increasing the clock frequency it was causing the CS (chip select) line to go high before the SPI transmission was complete. Adding an asm("nop") before driving the CS line high seems to have fixed the issue.