[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DMA and manual parallel port


DMA operation is not available in manual mode.

I think you need to use reverse ECP mode in some way,
or maybe the IEEE-1284 Byte mode.

Both these modes assume handshaking, with the peripheral
using nAck and the host (ETRAX 100LX) using nAutoFd.
But if you run slowly enough I think it is possible for
the peripheral to ignore the handshaking and just clock
in data to ETRAX.

What is "slowly enough" then ? I don't know, maybe a few Mbytes/s
I guess. 10 Mbytes/s is too fast anyway.

Per Zander

On Mon, 9 Aug 2004, Jeremy Turner wrote:

> Hi,
> Hardware: Axis Device Server 83, ETRAX 100 LX, on linux 2.4.20
> I've been reading through the archives trying to find a bit more info
> on using the parallel port in manual mode. I can currently read data
> from par0 using a polling scheme, but would like to use DMA if possible.
> I understand there is a skeleton parallel port driver with DMA
> available? The device I am connecting to does not have any handshaking,
> except for a data clock (p0ack), and can output the data very fast
> (>10Mbytes/sec), so I would like the parallel port to run as fast as
> possible.
> I have tried doing this using the parallel port in manual mode,
> but the DMA never reads any data.
> Steps taken:
> 1) Configure the parallel port to be in manual mode, using dma via
> R_PAR0_CONFIG etc.
> 2) connect DMA 2 and 3 to parallel port 0 in R_GEN_CONFIG (all
> conflicting devices are removed from the kernel configuration)
> 3) Reset the DMA and wait
> 4) Clear interrupts , then set up DMA channel 3 interrupt lines d_eol,
> and d_descr
> 5) Initialise the DMA descriptor using virt_to_phys where appropriate
> 6) Point R_DMA_CH3_FIRST to the descriptor, and start the DMA transfer.
> 7) Start the peripheral device data transfer.
> When I look at the R_DMA_CH3_STATUS, the buffer is always empty (= 0).
> also the R_DMA_CH3_CMD is always in START mode (= 1). I looked at the
> other registers with R_DMA_CH3, and the _FIRST field is correct, but the
> _NEXT and _DESCR fields don't look right (they are not the info in the
> descriptor). Also _HWSW doesn't show the correct size of the buffer.
> Does anyone have any idea on what could be causing this? I could attach
> my source code if required.
> Or if someone has a parallel port DMA driver in manual mode they could
> give me, that would be great.
> Thanks
> Jeremy Turner