Page 1 of 1

SDCard frequency configure on ESP32 using SPI interface.

Posted: Tue Jun 29, 2021 8:29 pm
by water
I try to configure SDCard frequency (use SPI interface) and measure SPI2-SCK(GPIO-18) frequency via oscilloscope, results below:

Code: Select all

sd = SDCard(slot = 2, sck = Pin(18), miso = Pin(19), mosi = Pin(23), cs = Pin(15), freq = 20000000)
20MHz

Code: Select all

sd = SDCard(slot = 2, sck = Pin(18), miso = Pin(19), mosi = Pin(23), cs = Pin(15), freq = 40000000)
40MHz

Code: Select all

sd = SDCard(slot = 2, sck = Pin(18), miso = Pin(19), mosi = Pin(23), cs = Pin(15), freq = 10000000)
400KHz

Code: Select all

sd = SDCard(slot = 2, sck = Pin(18), miso = Pin(19), mosi = Pin(23), cs = Pin(15), freq = 1000000)
400KHz
It seems all value specific will configure SPI-SCK to 400KHz except 20MHz and 40MHz, which frequency value available except above?