Thanks for the help. Some answers below. 

> -----Original Message-----
> From: Sebastian Kuzminsky [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 16, 2008 2:21 AM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] hm2_7i43 hostmot2 loading - invalid cookie?
> 
> Keil Hillman wrote:
> > I can't get hm2_7i43 and hostmot2 modules to init 7i43 card 
> following 
> > firmware load. Been working on this for past month thinking the 
> > problem was hardware parallel ports, however the error 
> seems to be the 
> > same "invalid cookie, got 0xBCFE80FE, expected 0x55AACAFE". 
> The "read data"
> > or "got 0xBCFE80FE" does change depending on paraport and firmware 
> > loading method used, but the end result is always "invalid 
> cookie" and
> > "-1 Invalid parameters" command line error.
> 
> The "invalid cookie" error indicates the following:  The 
> driver sent the firmware to the FPGA; the driver thinks the 
> FPGA accepted it; the driver tried to verify the firmware 
> running on the FPGA by reading a certain location; but the 
> value was not the expected value.
> 
> This probably means the FPGA is not running the firmware the 
> driver expects, or the communications between the driver and 
> the 7i43 is getting garbled somehow (maybe bad cable).
> 
> 
> Please verify the integrity of the firmware file by running 
> "md5sum SV8S.BIT", the output should be:
> 
> 1380a9b6afa6f93d4d57e2d59a632efa  SV8S.BIT
> 
> 
> The other 7i43 BIT files have these checksums:
> 
> cb3965e93765d02f08792eda93e6e0c1  SV8B.BIT
> e602bc3da57c69936a99aa523152d124  SVST4_4B.BIT
> 6c20162fe16be55191119788a2bd4bf6  SVST4_4S.BIT
> fcc06da0350919668613d4f661cfe016  SVST4_6B.BIT
> 

md5sum's are good.
dbx:$ md5sum SV8S.BIT 
1380a9b6afa6f93d4d57e2d59a632efa  SV8S.BIT
dbx:$ md5sum SVST4_4S.BIT
6c20162fe16be55191119788a2bd4bf6  SVST4_4S.BIT

> 
> Do you get the same "invalid cookie" error with the other 
> firmware files?
> 
> 
> How long is your parallel cable?  Is it rated for IEEE 1284?  
> Do you have any gender changers or adapters or anything in the path?
> 

I was afraid you'd ask about the cable. I questioned it at first and
this cable may very well be the problem. Here's the layout:

Parport0
(1) motherboard IDC26M header <-> IDC26F - standard PC 26 wire flat
ribbon cable - DB25F (external), standard PC parallel ribbon cable.
(2) Gender changer, you guessed it!
(3) same cable listed as 1 above, reversed to give IDC26F for connection
to 7i43.
I probed all 26 wires (end to end) on this combination with a Fluke DVM
for continuity.

Parport1 and parport2 were tested using the same cable arrangement,
however PCI parallel adapter parport1 is directly connected to card, not
ribbon cable to external mount.

Total length = 12" (1) x 2 = 24" (parport0,parport2) and 12" parport1. I
would think standard PC parallel ribbon cables are ieee1284 rated, but
I've had problems with serial ribbon cables, so I know what your getting
at.  

I've got a few IDC26F ribbon cable connectors and could make up a IDC26F
to IDC26F cable. I would have done this earlier, but my goofy gender
changer comb seemed be working. Also , I've loaded firmware via
sc7i43p.exe and read with rpo.exe using the same cable setup and return
value seemed reasonable. The DOS tools from Mesa have little or no
documentation regarding firmware verify, so I'm just guessing if loading
succeeded. 

Sebastian, I found an archive post mentioning you had problems with
cables. What solved those problems? 

> 
> > In addition to loading firmware with hm2_7i43, I've tried other
> > variations of commands, like loading firmware first with 
> bfload followed
> > by hostmot2 and hm2_7i43 (without firmware), but no luck. Firmware
> > loading seems to go well, INIT and DONE off, but hm2_7i43 
> module insmod
> > fails.
> > 
> > Also, tried to connect to 7i43 using tools from
> > mesa7i43-linux-utils-0.2.tar.bz2, but no luck either. Found 
> the correct
> > ieee1284 and python debs. Couldn't figure out parport 
> config stuff in
> > python scripts.
> 
> Wow, I'd forgotten about that package.  For it to work you 
> need to have 
> the Linux parport driver loaded, then when you make a mesa7i43 object 
> you pass parport_id="parportX" to the constructor (where X is 
> the number 
> of the linux parport device).  It defaults to parport0 if not 
> specified.
> 

Thanks. Something like: 
sudo modprobe parport parport_pc (with correct modparam's) ppdev 
export parport_id="parport1"
Do the *.py need to be compiled, I thought they were 0755 python
scripts? Sorry if this is trivial.

> 
> > Here's the hardware:
> > 0x378,0x0778                parport0
> > 0xd000,0xb800       parport1 (on-card port) 
> > 0xb400,0xb000       parport2 (ribbon cable port)
> > 7i43 powered from USB, no USB drivers in kernel.
> > 
> > software:
> > debian sid
> > Linux x2 2.6.22.081012.1 #1 PREEMPT Sun Oct 12 13:16:18 PDT 
> 2008 i686
> > GNU/Linux
> > kernel      /vmlinuz-2.6.22.081012.1 root=/dev/mapper/debian-root ro
> > acpi=off pnpbios=off isapnp=off
> > RTAI 3.6-cv (closure version)
> > Emc2 trunk current
> > 
> > Commands:
> > /etc/init.d/realtime start
> > sudo echo 4 > /proc/rtapi/debug
> > halcmd -V loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1
> > debug_pin_descriptors=1 debug_modules=1
> > halcmd -V loadrt hm2_7i43 ioaddr=0x378 ioaddr_hi=0x778 epp_wide=1
> > 'config="firmware=hm2/7i43/SV8S.BIT num_encoders=3 num_pwmgens=3
> > num_stepgens=0"' debug_epp=1
> > Or
> > /etc/init.d/realtime start
> > sudo echo 4 > /proc/rtapi/debug
> > halcmd -V loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1
> > debug_pin_descriptors=1 debug_modules=1
> > sudo halcmd -V loadusr -w bfload
> > 7i43:0x378,0x778=/lib/firmware/hm2/7i43/SV8S.BIT
> > halcmd -V loadrt hm2_7i43 ioaddr=0x378 ioaddr_hi=0x778 epp_wide=1
> > 'config="num_encoders=3 num_pwmgens=3 num_stepgens=0"' debug_epp=1
> > 
> > Note: Double quotes in hm2_7i43 command took me some time 
> to figure out,
> > as the config modparam single quotes were getting stripped 
> by Bash. This
> > might be something to add to "man hostmot2".
> > 
> > Commands http://pastebin.com/m512c5e55
> > dmesg http://pastebin.com/m59f40709
> 
> This is great info for debugging, thank you.
> 
> Your suggestion about the quotes for the config modparam is good too, 
> i'll add that to the manpage as you suggest.
> 
> 
> -- 
> Sebastian Kuzminsky
> Distances obtained as the speed of light multiplied by a cosmological
> time interval have no direct physical significance.
> <http://en.wikipedia.org/wiki/Observable_universe>
> 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to