Insane 80MHz spi speed on TFT with SPI_DEVICE_NO_DUMMY

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Insane 80MHz spi speed on TFT with SPI_DEVICE_NO_DUMMY

Postby Deouss » Fri Aug 03, 2018 2:45 am

I was trying to improve speed od tft displaying live video stream (from mouse) and got error when set clock_speed_hz>60Mhz
It prompted to ignore the error with SPI_DEVICE_NO_DUMMY and operate at desired frequency at your own risk
So here it is:

Code: Select all

spi_device_interface_config_t devcfg={
        .clock_speed_hz=80*1000*1000,           //Clock out at 80 MHz
        .mode=0,                                //SPI mode 0
        .spics_io_num=PIN_NUM_CS,               //CS pin
        .queue_size=7,                          //We want to be able to queue 7 transactions at a time
        .pre_cb=lcd_spi_pre_transfer_callback,  //Specify pre-transfer callback to handle D/C line
        .flags=SPI_DEVICE_NO_DUMMY              // ignore errors
    };
I managed to pull insane speed using wrover module and allocating buffer of half the size of the screen (320x240)
However I got ugly tearing effect so maybe someone could help how to wait for wertical sync on ILI9341
I tried to find something in datasheet but haven't figured it out. (I posted video here)
Also to mention I set the psram speed to 80MHz in menuconfig - it does make a huge difference
Has something to do with operation mode command.
Help would be appreciated )

User avatar
Vader_Mester
Posts: 300
Joined: Tue Dec 05, 2017 8:28 pm
Location: Hungary
Contact:

Re: Insane 80MHz spi speed on TFT with SPI_DEVICE_NO_DUMMY

Postby Vader_Mester » Fri Aug 03, 2018 7:46 am

Well done again!

Check page ILI9341 datasheet, page 202.

There is some possibility to improve tearing by setting some registers in the ILI9341, when using SPI mode.

There are some hints here. This is the ILI9341 lib for the Raspberry, and have some useful info.
https://github.com/juj/fbcp-ili9341

Code: Select all

task_t coffeeTask()
{
	while(atWork){
		if(!xStreamBufferIsEmpty(mug)){
			coffeeDrink(mug);
		} else {
			xTaskCreate(sBrew, "brew", 9000, &mug, 1, NULL);
			xSemaphoreTake(sCoffeeRdy, portMAX_DELAY);
		}
	}
	vTaskDelete(NULL);
}

Who is online

Users browsing this forum: No registered users and 112 guests