Re: Re: [H2200-port] MMC/SD now works on h2200

From: Phil Blundell <pb_at_reciva.com>
Date: Wed, 27 Apr 2005 09:21:42 +0100

On Tue, 2005-04-26 at 17:27 -0700, Matthew Reimer wrote:
> Yeah, it definitely wouldn't be worth it in that case. But I thought that DREQ
> just needed to stay high for the duration of the entire transfer, and
> therefore we'd only need to spin waiting for the initial data to become
> ready, set DREQEN, and then go off about our business while DMA takes care of
> the rest, disabling DREQEN when we get an RFLast interrupt. Is that not the
> case?

I don't think this will work. Since the DMA controller can read data
out of the HAMCOP many times faster than it is arriving from the card,
the FIFO will very quickly become empty. Once that happens, the DMA
controller must be immediately stopped, otherwise it will continue to
read garbage from the SDIDATA register and corruption will result.
Then, when more data arrives, the DMA controller must be re-started
quickly enough to prevent the FIFO from overflowing.

Normally you'd solve this problem by connecting DREQ to the the "fifo is
not empty" signal. That way, when all the data has been consumed, DREQ
will go false and DMA transfers will stop. But that signal is not
available outside the HAMCOP, so this won't work in our case.

Am I misunderstanding your suggestion?

p.
Received on Wed Apr 27 2005 - 03:25:18 EDT

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:20:11 EDT