On Thu, 28 Apr 2011, andy pugh wrote:

> Date: Thu, 28 Apr 2011 21:26:49 +0100
> From: andy pugh <bodge...@gmail.com>
> Reply-To: EMC developers <emc-developers@lists.sourceforge.net>
> To: EMC developers <emc-developers@lists.sourceforge.net>
> Subject: Re: [Emc-developers] [PATCH] Add support for Hostmot2 Buffered SPI
>     and the Mesa 7i65
> 
>> It would be convenient if you could teach your mailer to attach these as
>> text/plain or text/x-patch.
>
> I can try not using Gmail.
>
>> but the hal function mesa_7i65 does both reading and writing in one go.
>
> I did originally start with two functions and then combined them.
> However, I think there is a problem that SPI devices can't be read
> without writing to them, and the Hostmot2 "Read" cycle simply reads
> the values in all the registers it has been told to. An SPI read (as I
> understand it) is clocked through on the "write" data strobe.
> I am not at all expert on SPI though, and might be wrong.
> It would be possible, I assume, to add a third "echo" tram
> registration type to Hostmot2, which might be the only way to make
> this work.

Yes, you must send to receive with SPI so unless you want to duplicate the 
sending (Looking at the 7I43 timing I would think not) you need to reverse the 
normal order of read write (for SPI only). This means that the read data is 
always from the last thread invocations write, that is the read data is one 
thread time late. This is fine for the 7I65 as the SPI input data is not 
motion related.

It could be done in the normal read-calculate-write mode but this would at 
least double the overhead. This can possibly be ameliorated with the planned 
autosend feature of BSPI. But that will take a bit of work on my end.


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to