SPI Maximum speed

ESP_Sprite
Posts: 9723
Joined: Thu Nov 26, 2015 4:08 am

Re: SPI Maximum speed

Postby ESP_Sprite » Thu Oct 11, 2018 2:43 am

Note the crystal doesn't really matter; the ESP32 normally uses a PLL to derive the CPU frequency from this, then divides the CPU frequency by an applicable number to get the 80MHz APB clk.

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

Re: SPI Maximum speed

Postby Vader_Mester » Thu Oct 11, 2018 10:41 am

anakyr wrote:I'm 100% sure that I have a 40MHz crystal. Check attachment too. I will try first to include SPI_DEVICE_NO_DUMMY in order to ignore this checking, as the error message in red is saying. If it doesn't work, I will go to the registers :)
Why did I forget about the GPIO MUX?

You can route your SPI directly to pins without using the GPIO MUX matrix, so with it you can achieve higher speeds. I think all your answers are in fact in the red warning message.

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);
}

anakyr
Posts: 22
Joined: Fri Jun 15, 2018 12:09 pm

Re: SPI Maximum speed

Postby anakyr » Thu Oct 11, 2018 12:15 pm

Thanks a lot for the answers. Using this dummy flag I was able to produce 40 MHz at the MOSI.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 154 guests