Page 1 of 1

which GPIO pins for SPI with DMA on lyrat 4.3

Posted: Thu Jan 09, 2020 2:22 pm
by benbiles
Hi,

I'd like to setup a SPI device located on external pins on Lyrat 4.3 dev board using DMA transfer.

so , 2 questions !

1/ is there DMA mapping on the ESP32 module for SPI ( only certain GPIO pins available for DMA / SPI ? )

2/ what pins are best to use ? the I2S pins are connected to the Codec IC. I don't need JTAG or SD card , should I used these? Or configure the UART GPIO pins to SPI ?

I can probebly work this out myself but wonder if theres an obvious example of external SPI setup with DMA I can look at for the Lyrat 4.3 board ?

Re: which GPIO pins for SPI with DMA on lyrat 4.3

Posted: Fri Jan 10, 2020 3:08 am
by ESP_Sprite
Not sure about the Lyra board pinout, but in general: yes, the SPI peripherals in the ESP32 have hardware acceleration; if you use our driver, this is handled more-or-less automatically for you. Secondly, the SPI pins can be routed over the GPIO matrix; this means you can use any pin that is not otherwise used for any SPI signal. (Do note that GPIOs >=34 are input-only and don't have pullup capability, though.) The only gotcha is that if you need speeds >20MHz, it may work better to use dedicated pins; see the SPI driver esp-idf documentation for more info.

Re: which GPIO pins for SPI with DMA on lyrat 4.3

Posted: Wed Jan 22, 2020 2:47 pm
by benbiles
ok great , I'm pretty sure I can get away with less than 20mhz SPI as long as I can get DMA working so I'll try to use the multiplexer and repurpose the JTAG pins on the lyrat 4.3 board.

no idea yet where the JTAG GPIO pins are defined in esp-adf but should be able to find them.
hopefully I'll have enough GPIO left since the audio CODEC etc uses a fair amount already.