So Close- Just Need Help With Config and Firmware

More
10 Oct 2013 23:38 - 10 Oct 2013 23:40 #39739 by CalmofDawn
Ok so I've got the following system:

AsRock B75Pro-M Motherboard
DDR3 1333 4Gb RAM
Intel G2120 CPU
Rosewill Parallel Card RC-302E
Adata 64Gb SSD
Nvidia GEForce 8400GS Video Card

I've downloaded the LinuxCNC-Ubuntu ISO from: linuxcnc.org/hardy/lucid/index.php/english/download

I used UNetbootin to produce a bootable USB drive (storage-formatted FAT32) from the ISO file: unetbootin.sourceforge.net/

I installed LinuxCNC-Ubuntu successfully by booting from the USB Drive and going through the wizard with custom partitions:
swap partition (Logical, 2000MB, Beginning, Swap Area)
disk partition [Format] (Logical, 10000MB, Beginning, Ext4 journaling file system, / )
home partition [Format] (Logical, remainingMB, Beginning, Ext4 journaling file system, /home)
***My partition master base was .../sdb instead of .../sda so I had to go to Advanced>Bootloader Directory and change sda to sdb***

I had a tough time installing Nvidia drivers, ending up just typing
sudo apt-get install nvidia-current nvidia-settings
sudo reboot

But that gave me really high Jitter when I tested latency using Applications>CNC>Latency Test (high like 1ms). Initially I thought it was an SMI problem but that was not it. So I went to my BIOS/UHCI (pressing F2 upon computer boot) and disabled:
>Advanced>CPU Configuration
Enhanced Halt State (C1E)
CPU C3 State Support
CPU C6 State Support
Package C State Support
And disabled more:
Disable Intel SpeedStep
Disable Intel Virtualization Technology
Disable Intel RapidStart
Disable Intel SmartConnect
North Bridge Configuration
IGPU MultiMonitor Disabled
South Bridge Configuration
Onboard HD Audio Disabled
ACPI Configuration
Suspend to RAM Disabled
ACPI HPET Table Disabled

And that helped bring the jitter down to <400us but still too high. After searching some more I discovered that Nvidia drivers have a tough time with OpenGL graphics which LinuxCNC's AXIS relies heavily on. So I disabled the Nvidia driver in System>Administration>Hardware Drivers and rebooted the computer, and it started Ubuntu in low-graphics mode then (VGA still plugged to Nvidia video card). Frustrated, I reinstalled Ubuntu-LinuxCNC using the bootable USB Drive and to my surprise the default nouveau drivers were working fine with the Nvidia video card.

So latency then became really good, jitter <5000ns. With latency out of the way and no video problems running LinuxCNC with Applications>CNC>LinuxCNC>Sherline_Lathe, I wanted to finish the puzzle by setting up the right LinuxCNC configuration and flash custom firmware as necessary to my Mesa boards (7i43-U-4-ROHS and 7i42TA-ROHS) since the inter-connect wiring was a breeze with the cables from Mesa (EPP-M CBL 3FT and AIO-CBL-2FT).

So that's where I am right now, the computer in its case and the Mesa boards inside a shoddy cardboard enclosure but 5V/GND power ready to provide to each board.

I know firmware can be developed (and flashed also?) with Xilinx Webpack Tools (which is free as in free beer). I've tried downloading, extracting, and installing on Linux but it doesn't seem to run when I run settings32.sh as per the Xilinx instructions. Link: www.xilinx.com/products/design-tools/ise...uite/ise-webpack.htm

And LinuxCNC has a great PNCConf wizard, most of which I can understand (good doc at linuxcnc pncconf doc ), but I'm not sure if my parport card is doing alright. I type in Terminal (Ctrl+Alt+T) the "sudo lspci -v" command and see Oxford Semiconductor Devices as a prime contender for being the recognized parport PCIE card, but its addresses for its 8-pin port and 4-pin port are definitely not 0x378.

So that's where I'm blocked right now, just unsure of how to fix the issues with Webpack and unsure of whether 0x378 is still the right parport address. Is my mental model of the system correct? The right configuration files in the emc2 folder to be created with pncconf wizard, the right firmware to be developed and flashed using Webpack tools to the FPGA. Is there a particular order I should do these, does pncconf require the 7i43 to be connected during setup?

I'd appreciate help on unblocking and moving forward onto successful gcode testing, at which point everything should be go-go.
Last edit: 10 Oct 2013 23:40 by CalmofDawn.

Please Log in or Create an account to join the conversation.

More
11 Oct 2013 01:34 #39746 by PCW
I would not worry about webpack and compiling Xilinx bitfiles unless you need a pretty unusual configuration.

If the 7I43 is to be connected to the PCIE parallel port card, you must use one of the addresses listed for the port with lspci
(its often the first address listed but not always)

0x378 can only be a motherboard port (if you have a motherboard port it may be easier to use)

Please Log in or Create an account to join the conversation.

More
11 Oct 2013 01:46 #39747 by cncbasher
you should not need to do any firmware flashing , or at least not to start with , and then only if needed , the bit file is uploaded on startup by linuxnc , but one point to make sure of is that the 7i43 is reconised
and that your parrallel port is set to EPP mode in your bios . so check the led's on the 7i43 when starting a config and you'll see the card being setup

easy to just try a preset config to start with to at least make sure the card is being seen , and then progress to pncconf later on .

Please Log in or Create an account to join the conversation.

More
11 Oct 2013 02:38 #39748 by CalmofDawn
@PCW

Ok, I checked "sudo lspci -v" again and found that under "Oxford Semiconductor..." (the listed device with parport module) the first port (8-pin) has the address "e010". Alas my motherboard does not have an onboard parport.

@cncbasher

It's a relief to hear I might not need to start with firmware flashing. So I tried setting up a preset config:

First I went into my BIOS/UHCI under Advanced>Super I/O and confirmed that my Parallel Port = Enabled and Device Mode = ECP and EPP-1.9

Then I went through the Mesa 7i43 manual and discovered that I need the W4 and W5 jumpers to both be in the "DOWN" position in order for FPGA configuration to be set via EPP mode. Link to manual, see page 6: www.mesanet.com/pdf/parallel/7i43man.pdf

So i set the W4/W5 jumpers to DOWN, DOWN. Then I turned off the computer and connected the 7i43's parallel cable to the computer's parallel port. Then I turned on the computer and then applied 5V to the 7i43 and 7i42. On the 7i42, a green LED lit up. On the 7i43, the PWR led became yellow, the DONE led became red, and the INIT LED became red.

I went to Applications>CNC>LinuxCNC then started the SherlineMill_inch preset configuration, and no changes in the LEDs were visible, and the AXIS Gui popped up as usual.

So I tried creating a new configuration using pncconf, and selected "7i43-4" as the Mesa PCI/Card, and typed in "e010" as the 7i43-4's parport address. When I ran this configuration, I got an error.

Thoughts on how to confirm that the 7i43 is being recognized properly?

Please Log in or Create an account to join the conversation.

More
11 Oct 2013 02:46 - 11 Oct 2013 02:50 #39749 by PCW
A couple things:

1. 0xE010 may not be the correct address, you may need to try all the OxSemi addresses listed by lspci

2. BIOS settings are never about PCI/PCIE parallel ports so you must have motherboard parallel port (possibly wired to a header)

3. An easier way to check 7I43 connectivity is to run one of the hm2-stepper or hm2-servo sample configs
Last edit: 11 Oct 2013 02:50 by PCW.

Please Log in or Create an account to join the conversation.

More
11 Oct 2013 06:44 - 11 Oct 2013 07:09 #39752 by CalmofDawn
I double-checked the motherboard manual and alas no parallel port.

I tried out the "7i43-big" LinuxCNC configuration in the hm2-stepper folder, and got the following error message:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.5.0
Machine configuration directory is '/home/user/linuxcnc/configs/hm2-stepper'
Machine configuration file is '7i43-big.ini'
INIFILE=/home/user/linuxcnc/configs/hm2-stepper/7i43-big.ini
PARAMETER_FILE=hm2-stepper.var
TASK=milltask
HALUI=
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=2296
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/hm2_7i43.ko': -1 Invalid parameters
hm2-stepper.hal:41: exit value: 1
hm2-stepper.hal:41: insmod failed, returned -1
See the output of 'dmesg' for more information.
2296
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 214.841013] I-pipe: Domain RTAI registered.
[ 214.841017] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 214.841018] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 214.841040] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 214.841041] PIPELINE layers:
[ 214.841043] fca35e20 9ac15d93 RTAI 200
[ 214.841044] c085cb20 0 Linux 100
[ 214.850562] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 214.850727] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 214.850730] RTAI[sched]: hard timer type/freq = APIC/6235800(Hz); default timing: periodic; linear timed lists.
[ 214.850732] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 3093522000 hz.
[ 214.850734] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 214.850769] RTAI[usi]: enabled.
[ 214.867684] RTAI[math]: loaded.
[ 214.903567] hm2: loading Mesa HostMot2 driver version 0.15
[ 214.905245] hm2_7i43: loading HostMot2 Mesa 7i43 driver version 0.3
[ 214.907365] hm2_7i43: /DONE is not low after CPLD reset!
[ 214.907401] hm2_7i43.0: firmware: requesting hm2/7i43/SVST4_4B.BIT
[ 214.908445] hm2/hm2_7i43.0: board has FPGA '3s200tq144', but the firmware in hm2/7i43/SVST4_4B.BIT is for FPGA '3s400tq144'
[ 214.908450] hm2_7i43.0: board at (ioaddr=0x0378, ioaddr_hi=0x0778, epp_wide ON) not found!
[ 215.046369] hm2: unloading
[ 215.064070] RTAI[math]: unloaded.
[ 215.079100] SCHED releases registered named ALIEN RTGLBH
[ 215.107343] RTAI[malloc]: unloaded.
[ 215.207221] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 215.208349] I-pipe: Domain RTAI unregistered.
[ 215.208381] RTAI[hal]: unmounted.

I tried with the custom pncconf-produced configuration with 0xE010, and 0xE000, and this same error phrase seems to be consistent:
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/hm2_7i43.ko': -1 Invalid parameters

What's also strange is:
[ 214.908445] hm2/hm2_7i43.0: board has FPGA '3s200tq144', but the firmware in hm2/7i43/SVST4_4B.BIT is for FPGA '3s400tq144'
because this is supposed to be a 7i43-big (7i43-U-4) but the board has 3s200... instead of 3s400.

So I also tested the 7i43-small just to check, and I don't get a firmware mismatch line anymore but I do get: "failed to reset FPGA, aborting hm2 register"

So it seems like the 2 issues are firmware mismatch and inability to load the hm2_7i43.ko module.

EDIT: I found out that I forgot to move the W7 jumper to the "UP" position so that the power supply turns on even when the USB interface is not activated. However, this change did not repair the errors at all...
Last edit: 11 Oct 2013 07:09 by CalmofDawn.

Please Log in or Create an account to join the conversation.

More
11 Oct 2013 07:08 #39753 by PCW
Thats all pretty much expected as the port address is incorrect:

hm2_7i43.0: board at (ioaddr=0x0378, ioaddr_hi=0x0778,epp_wide ON) not found!

You will have to edit the 7i43-big.ini file in the linuxcnc/configs/hm2-stepper directory
and change the port address to the address of your OxSemi parallel port card
(which may still require trying a number of addresses)

Please Log in or Create an account to join the conversation.

More
11 Oct 2013 07:22 - 11 Oct 2013 07:25 #39754 by CalmofDawn
I navigated to home/linuxcnc/configs/hm2-stepper and opened 7i43-big.ini with gedit, but there was no field that involved port address. I tried adding the line: "ioaddr = 0xE010" but that did not do anything, alas.

The 2 addresses I get under the OxSemi listing are: e010 and e000.
Last edit: 11 Oct 2013 07:25 by CalmofDawn.

Please Log in or Create an account to join the conversation.

More
11 Oct 2013 11:09 #39756 by PCW
Did you try both 0xE000 and 0xE010?

man hm2_7i43 has the syntax

Please Log in or Create an account to join the conversation.

More
11 Oct 2013 11:23 #39757 by CalmofDawn
Yeah, in 7i43-big.ini I tried both

IOADDR = 0xE000

and

IOADDR = 0xE010

but neither did anything to change the errors.

What does "man hm2_7i43 has the syntax" mean?

Please Log in or Create an account to join the conversation.

Time to create page: 0.187 seconds
Powered by Kunena Forum