cancel
Showing results for 
Search instead for 
Did you mean: 

Can DMA output a byte stream with 8080 style 'write' strobe?

JSmit.18
Associate II

Hi everybody,

I am using STM32F401CE and would like to use DMA to output a block of bytes using a 8 bit output port and a 'write' strobe output. That is, 8 output pins + 1 strobe output for the strobe pulse, per the timing diagram of the ILI9341 TFT screen controller:

https://i.imgur.com/A11Yfgh.png

  1. The data block should be transferred as fast as possible (but not faster than 66ns per cycle, and with proper setup and hold time), so I presume that the DMA should be free running rather than triggered on each byte by a timer. Does this make sense?
  2. Let's say that I will allocate the 8 LSB bits of port A for the data out. Can the DMA write just to that byte, not interfering with the rest of Port A's bits?
  3. What can be the mechanism for the strobe output pulse? Does the DMA has this capability built in?

Any suggestion would be greatly appreciated. I am already using DMA for double ADC sampling and it works well but didn't figure out this one yet.

Thanks,

5 REPLIES 5

You probably want to connect the TFT controller to FSMC.

JW

Thanks for the answer.

I am not familiar with FSMC and a quick search in the STM32F401CE's datasheet for 'FSMC' provides no hit.

Can you point me in the right direction?

It probably doesn't, perhaps you can pick a more appropriate part?

You could perhaps drive a pattern buffer via GPIOx->BSRR, but getting the strobe will eat a lot of memory.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

What if I will use timer(s), can this work? E.g. a timer that generates both the strobe output and the DMA per byte trigger?

  1. Can this achieve a transfer rate of let's say 10M bytes/sec on a 84Mhz STM32F401CE?
  2. Can the DMA update Port A bits 0 to 7 without interfering with the other bits?

> I am not familiar with FSMC and a quick search in the STM32F401CE's datasheet for 'FSMC' provides no hit.

External memory interface.

Ah, the 'F401 as the lowest member of the 'F4 family is stripped of it.

Can't you go for a 'F4 or other STM32 which does have it? It simplifies this particular issue a lot.

> What if I will use timer(s), can this work? E.g. a timer that generates both the strobe output and the DMA per byte trigger?

 Yes.

> Can this achieve a transfer rate of let's say 10M bytes/sec on a 84Mhz STM32F401CE?

That may be tricky. Would that be the only thing running at given DMA, probably yes. But other DMA processes will interfere, and so will processor accessing either the memory where the pattern is, and/or the GPIOs in questions.

The worst thing with this scheme is, that there's no feedback, whether the write has happened or not, into the timer. In other words, the timer ticks away, regardless of whether the DMA succeeds or is delayed. The result won't look like what you want.

> Can the DMA update Port A bits 0 to 7 without interfering with the other bits?

Using BSRR, yes, but you'd need to prepare 32-bit data into BSRR for each byte, beforehand.

JW