Re: MCU w/ DMA SPI or suggestions?



larwe wrote:
On Jul 27, 11:28 pm, Bob <SkiBoy...@xxxxxxxxxx> wrote:

Maybe I wasn't clear: that's 3.84Mb/s on *four* simultaneous data lines
to the LCD while toggling the pixel clock line. Ok, I can imagine

What? No it isn't. If you have a 320x240 [mono] STN LCD that uses a 4-
bit data interface, data is sent 4 pixels at a time. (Grayscales are
achieved through FRM, nota bene) Your data requirement is 3.84Mbps out

Thanks, FRM is what I meant when I called it PWM. A gray pixel is on for x out of N frames and off for the remainder. Thanks for giving me the correct term.

a single serial line, 960Knibbles/sec to the LCD. This can be achieved
by:

- configure SPI peripheral as master
- route MOSI to a 4-bit serial-to-parallel shift register, outputs of
which go to a 4-bit latch.
- route SCK to the shift register, and SCK/4 to the latch and to the
LCD's data clock line.

Actually the data rate is a bit higher than that because each line has
a front and back porch of finite size, during which time there is no
data transfer.

OK. I get it now. I didn't see how to shove the byte into the SPI tx register without looping and doing _nothing_ else... Now, if the MCU can DMA to the SPI, everything is easy.

To expand on what you said: SPI into a serial-to-parallel and combine each 2 bits in the output latch with the two frame count bits (current frame count 0 to 3 for 2 bit monochrome) to get the FRM lookup value that goes into the LCD panel.

Since I really only need 3 colors (white, black, and one gray) I could use the extra color to generate the porches by padding my image rows and gating the pixel clock off. The DMA can handle an entire frame and leave the processor alone until the DMA terminate interrupt fires at 70Hz. Even if I can't get the porches to run automatically from the data, the interrupt interval for each row is around 30uS so I'll have a *little* time to get other things done. (70Hz frame * 240 rows = 33.6kHz)

And, you're right: all the above fits in a tiny PAL!

Now I just need a micro that can DMA to the SPI.

To recap my minimum requirements:
1) 32kSRAM internal
2) 128kFlash internal
3) DMA over SPI
4) at least one other serial ifc to talk to the host (SPI or UART) - DMA nice but not required.
5) non-BGA

I've found the AT91SAM7 family can do it (does that mean any ARM7 can do it?). I don't need all the other hooha that comes with the AT91 family but at $10, I'm OK with letting it go to waste ;-) Any other families I should be looking at to get item #3?

Thanks again,
Bob



.



Relevant Pages

  • Re: MCU w/ DMA SPI or suggestions?
    ... to the LCD while toggling the pixel clock line. ... If you have a 320x240 STN LCD that uses a 4- ... I didn't see how to shove the byte into the SPI tx ... DMA to the SPI, everything is easy. ...
    (comp.arch.embedded)
  • Re: MCU w/ DMA SPI or suggestions?
    ... gating the pixel clock off. ... behaviour during frame rate control. ... to the LCD while toggling the pixel clock line. ... DMA to the SPI, everything is easy. ...
    (comp.arch.embedded)
  • Re: MAX11043 - trying to avoid interrupts at 200kHz...
    ... does have a SPI DMA subsystem, but needs to be primed in code... ... So why not do the code for SPI with DMA? ... If you are sending data in Ethernet packets, you will be buffering the ... EOC interupt Start DMA of 4 x 16 bit transfers. ...
    (comp.arch.embedded)
  • Re: PXA2xx SPI controller updated for 2.6.16-rc1?
    ... There are some SPI (and ... > I've attached my attempt (PIO works but DMA doesn't) if it's of any use. ... I believe this is the correct SSP in SPI mode behavior for PXA2xx. ... DMA descriptor chaining the next optimization for the driver. ...
    (Linux-Kernel)
  • [git pull] (updated) spi changes for 2.6.38
    ... Added one more patch from Russell to get omap DMA working. ... spi: davinci: fix checkpatch errors ... spi: davinci: remove non-useful interrupt mode support ...
    (Linux-Kernel)