libftdi Archives

Subject: Re: interface A on a 4232

From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@xxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sat, 06 Jun 2009 00:51:08 +0200
On 06.06.2009 00:35, Paul Fox wrote:
> carl-daniel wrote:
>  > On 05.06.2009 23:12, Paul Fox wrote:
>  > > i'm using one of the module's MPSSE blocks to drive a SPI interface.
>  > >   
>  > 
>  > Do you have any example code I could look at? Unfortunately, I didn't
>  > find docs on how to set polarity, endianness etc for SPI.
>
> i'm getting there, slowly.  i can do a RDID command and identify
> our winbond flash part.  i can send you that much if you'd like -- i'd
> like to clean it up just a tad.
>   

If you can send RDID and receive the result, the code is already perfect
for me. Nothing else is needed.


> i believe you and richard smith have corresponded about this
> project before -- we're trying to put together a programmer based
> on the 4232H to do ISP programming of the XO laptop. 

Yes. That's what I'm working on. Since the libftdi documentation in the
SPI area is pretty sparse, I worked on the TotalPhase Cheetah instead.
That code could run in theory, but I have not tested it and there are
licensing problems.


> i'm fitting
> my changes into flashrom, but as i think you know, it's pretty
> geared toward hosted self-programming, and being able to map in
> the area being programmed.

You must be working with a pretty old version of flashrom. Over the last
few weeks, external programmer support has been added and we already
have two external programmers working, neither of them requiring any
mapping.


> i'm hoping you have a better idea of
> how pull in programmers like this one than i do.  :-)
>   

Since I wrote the complete SPI infrastructure for flashrom, I can tell
you that implementing support for external SPI programmers (excluding
init and shutdown functions) is roughly 18 lines of code (for the
TotalPhase Cheetah, anyway).


Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread