which GPIO pins for SPI with DMA on lyrat 4.3

benbiles
Posts: 32
Joined: Sun Dec 15, 2019 4:46 pm

which GPIO pins for SPI with DMA on lyrat 4.3

Postby benbiles » Thu Jan 09, 2020 2:22 pm

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 ?

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

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

Postby ESP_Sprite » Fri Jan 10, 2020 3:08 am

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.

benbiles
Posts: 32
Joined: Sun Dec 15, 2019 4:46 pm

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

Postby benbiles » Wed Jan 22, 2020 2:47 pm

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.

Who is online

Users browsing this forum: No registered users and 76 guests