10 years, 5 months ago.

Seeed Arch Max - DMA possible with SPI_TFT_ILI9341

Hi, The Arch Max is a very fast board (STM32F407VET6 @ 168MHz) with Arduino connectors on it. However working with the SPI_TFT_ILI9341 does probably not use DMA on it and the Adafruit - 2.8 TFT Touch Shield for Arduino Capacitive Touch (ILI9341) is very slow on it. On The Arch Pro, DMA is enabled and it is much faster. The screen clears in say 0.1 sec on the Arch Pro and in more than 4 seconds on the Arch Max. Is it possible to use DMA on the Arch Max for this as well? I found this page which indicates it could do DMA as well, I think: https://developer.mbed.org/users/mbed_official/code/mbed/file/031413cf7a89/TARGET_ARCH_MAX/ I'm a real novice to DMA. Is there anybody who has experience with this? Kind Regards, Jack.

1 Answer

10 years, 5 months ago.

DMA allows you to do other things while the SPI Transaction takes place, however the transaction itself will not be faster than a good SPI driver. Now the issue is that the overhead from the mbed driver, and especially on something like Nucleo devices which have another driver layer below that, combined with the requirement to always read back what you are writing, adds alot of deadtime between SPI transactions.

Your options:

1. Wait, there have been new mbed API commands added, which might increase SPI speed (even though it was not specifically created for this).

2. Try adding DMA yourself, a warning: STM DMA is not one of the easier ones to use

3. Port https://developer.mbed.org/users/Sissors/code/BurstSPI/?revcount=1 to your target. There is already one STM target supported, so with luck yours is similar, with bad luck it is not. (Actually I can have a look at it myself maybe the coming days). This library is intended mainly for SPI TFTs, and adds a write function which does only do the bare minimum: Check if there is space in the write buffer, if yes: Dump data in there and return.

Of course then you also need to modify the LCD library, but that shouldn't be too hard.

Accepted Answer

Hi Erik, I see you live near Eindhoven, you have quit a lot of platforms. Are you able to implement such BurstSPI for the Arch Max, if i send you such board? (I have one extra) Regards, Jack.

posted by Jack Berkhout 14 May 2015

Yeah that should be possible, lets go to e-mail :).

posted by Erik - 14 May 2015