Can Asus Tinker Board run LINUXCNC

More
07 Nov 2019 00:18 #149781 by andypugh

I guess I just meant that that using halcompile outside of the norrnal LinuxCNC source tree for hm2 drivers seem odd


I agree, It might be worth trying an in-tree build, but it really did look to have gone smoothly, and it appeared to execute too.

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

More
07 Nov 2019 02:42 #149799 by terry1992
There are no hw_intf.conf in the boot folder of my tinker.
I think it might because of that the OS I use is armbian.
So I checked the hardware function again.


And just for refrence. The result of readhmid are as follows
atech@tinkerboard:~$ cd mesaflash
atech@tinkerboard:~/mesaflash$ sudo ./mesaflash --device 7I90 --spi --addr /dev/spidev2.0 --readhmid
[sudo] password for atech: 
unable to set bpw32, fallback to bpw8
Configuration Name: HOSTMOT2

General configuration information:

  BoardName : MESA7I90
  FPGA Size: 9 KGates
  FPGA Pins: 144
  Number of IO Ports: 3
  Width of one I/O port: 24
  Clock Low frequency: 100.0000 MHz
  Clock High frequency: 200.0000 MHz
  IDROM Type: 3
  Instance Stride 0: 4
  Instance Stride 1: 64
  Register Stride 0: 256
  Register Stride 1: 256

Modules in configuration:

  Module: WatchDog
  There are 1 of WatchDog in configuration
  Version: 0
  Registers: 3
  BaseAddress: 0C00
  ClockFrequency: 100.000 MHz
  Register Stride: 256 bytes
  Instance Stride: 4 bytes

  Module: IOPort
  There are 3 of IOPort in configuration
  Version: 0
  Registers: 5
  BaseAddress: 1000
  ClockFrequency: 100.000 MHz
  Register Stride: 256 bytes
  Instance Stride: 4 bytes

  Module: QCount
  There are 4 of QCount in configuration
  Version: 2
  Registers: 5
  BaseAddress: 3000
  ClockFrequency: 100.000 MHz
  Register Stride: 256 bytes
  Instance Stride: 4 bytes

  Module: PWM
  There are 4 of PWM in configuration
  Version: 0
  Registers: 5
  BaseAddress: 4100
  ClockFrequency: 200.000 MHz
  Register Stride: 256 bytes
  Instance Stride: 4 bytes

  Module: StepGen
  There are 8 of StepGen in configuration
  Version: 2
  Registers: 10
  BaseAddress: 2000
  ClockFrequency: 100.000 MHz
  Register Stride: 256 bytes
  Instance Stride: 4 bytes

  Module: LED
  There are 1 of LED in configuration
  Version: 0
  Registers: 1
  BaseAddress: 0200
  ClockFrequency: 100.000 MHz
  Register Stride: 256 bytes
  Instance Stride: 4 bytes

Configuration pin-out:

IO Connections for P1
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 1      0   IOPort       QCount           1        Quad-B          (In)
 3      1   IOPort       QCount           1        Quad-A          (In)
 5      2   IOPort       QCount           0        Quad-B          (In)
 7      3   IOPort       QCount           0        Quad-A          (In)
 9      4   IOPort       QCount           1        Quad-IDX        (In)
11      5   IOPort       QCount           0        Quad-IDX        (In)
13      6   IOPort       PWM              1        PWM             (Out)
15      7   IOPort       PWM              0        PWM             (Out)
17      8   IOPort       PWM              1        Dir             (Out)
19      9   IOPort       PWM              0        Dir             (Out)
21     10   IOPort       PWM              1        /Enable         (Out)
23     11   IOPort       PWM              0        /Enable         (Out)
25     12   IOPort       QCount           3        Quad-B          (In)
27     13   IOPort       QCount           3        Quad-A          (In)
29     14   IOPort       QCount           2        Quad-B          (In)
31     15   IOPort       QCount           2        Quad-A          (In)
33     16   IOPort       QCount           3        Quad-IDX        (In)
35     17   IOPort       QCount           2        Quad-IDX        (In)
37     18   IOPort       PWM              3        PWM             (Out)
39     19   IOPort       PWM              2        PWM             (Out)
41     20   IOPort       PWM              3        Dir             (Out)
43     21   IOPort       PWM              2        Dir             (Out)
45     22   IOPort       PWM              3        /Enable         (Out)
47     23   IOPort       PWM              2        /Enable         (Out)

IO Connections for P2
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 1     24   IOPort       StepGen          0        Step/Table1     (Out)
 3     25   IOPort       StepGen          0        Dir/Table2      (Out)
 5     26   IOPort       StepGen          0        Table3          (Out)
 7     27   IOPort       StepGen          0        Table4          (Out)
 9     28   IOPort       StepGen          0        Table5          (Out)
11     29   IOPort       StepGen          0        Table6          (Out)
13     30   IOPort       StepGen          1        Step/Table1     (Out)
15     31   IOPort       StepGen          1        Dir/Table2      (Out)
17     32   IOPort       StepGen          1        Table3          (Out)
19     33   IOPort       StepGen          1        Table4          (Out)
21     34   IOPort       StepGen          1        Table5          (Out)
23     35   IOPort       StepGen          1        Table6          (Out)
25     36   IOPort       StepGen          2        Step/Table1     (Out)
27     37   IOPort       StepGen          2        Dir/Table2      (Out)
29     38   IOPort       StepGen          2        Table3          (Out)
31     39   IOPort       StepGen          2        Table4          (Out)
33     40   IOPort       StepGen          2        Table5          (Out)
35     41   IOPort       StepGen          2        Table6          (Out)
37     42   IOPort       StepGen          3        Step/Table1     (Out)
39     43   IOPort       StepGen          3        Dir/Table2      (Out)
41     44   IOPort       StepGen          3        Table3          (Out)
43     45   IOPort       StepGen          3        Table4          (Out)
45     46   IOPort       StepGen          3        Table5          (Out)
47     47   IOPort       StepGen          3        Table6          (Out)

IO Connections for P3
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 1     48   IOPort       StepGen          4        Step/Table1     (Out)
 3     49   IOPort       StepGen          4        Dir/Table2      (Out)
 5     50   IOPort       StepGen          4        Table3          (Out)
 7     51   IOPort       StepGen          4        Table4          (Out)
 9     52   IOPort       StepGen          4        Table5          (Out)
11     53   IOPort       StepGen          4        Table6          (Out)
13     54   IOPort       StepGen          5        Step/Table1     (Out)
15     55   IOPort       StepGen          5        Dir/Table2      (Out)
17     56   IOPort       StepGen          5        Table3          (Out)
19     57   IOPort       StepGen          5        Table4          (Out)
21     58   IOPort       StepGen          5        Table5          (Out)
23     59   IOPort       StepGen          5        Table6          (Out)
25     60   IOPort       StepGen          6        Step/Table1     (Out)
27     61   IOPort       StepGen          6        Dir/Table2      (Out)
29     62   IOPort       StepGen          6        Table3          (Out)
31     63   IOPort       StepGen          6        Table4          (Out)
33     64   IOPort       StepGen          6        Table5          (Out)
35     65   IOPort       StepGen          6        Table6          (Out)
37     66   IOPort       StepGen          7        Step/Table1     (Out)
39     67   IOPort       StepGen          7        Dir/Table2      (Out)
41     68   IOPort       StepGen          7        Table3          (Out)
43     69   IOPort       StepGen          7        Table4          (Out)
45     70   IOPort       StepGen          7        Table5          (Out)
47     71   IOPort       StepGen          7        Table6          (Out)

I also tried to do loadrt hm2_spi.
The result are as follows
atech@tinkerboard:~/linuxcnc-dev/src$ halrun
halcmd: loadrt hostmot2
Waiting for component 'hostmot2' to become ready.....Waited 3 seconds for master.  giving up.
.Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15

halcmd: loadrt hm2_spi spidev_path="/dev/spidev2.0"
probe 24000000
hm2_spi: rtapi_app_main: Permission denied (-13)
<stdin>:2: waitpid failed /home/atech/linuxcnc-dev/bin/rtapi_app hm2_spi
<stdin>:2: /home/atech/linuxcnc-dev/bin/rtapi_app exited without becoming ready
<stdin>:2: insmod for hm2_spi failed, returned -1
Attachments:

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

More
07 Nov 2019 12:36 #149845 by andypugh
Are you sure that the board is in SPI2 and not SPI0?

Possibly SPI and SPIDEV are mutually exclusive?

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

More
08 Nov 2019 02:06 #149898 by terry1992
Yes, the 7i90hd card is connect to the spi2 pin of the tinker.( pin19=TX, pin21=RX, pin 23=CLK, pin24=csN0 )



However, I cannot tell if the hm2_tkboard use spi0 or spi2 from the source code.
I connect to spi2 because the author of the driver and the youtube video tell me it use spi2.

I also tried to do the spi communication when the spi2 is turned off and when spi2dev is turned off.(test1 & test2)

test1: spi2 : off spi2dev: on;

test2: spi2 : on spi2dev: off;


Both of the test shows cannot find device.
Attachments:

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

More
12 Nov 2019 23:48 - 14 Nov 2019 01:07 #150260 by berin
HI I have been working on a similar project one of my post's links to a lot of information. I also have files from people somewhere who have gotten the tinkerboard working well with mesa controlelrs. The issue is you need to have a HAL driver for the GPIO. OR you can use an ethernet MESA card. but anything running via the gpio I believe needs a hal driver for lcnc. There is a guy who has been promising to produce a GPIO direct control to treat the GPIO I/O pins them selfs like a parallel port. But he has not produced any files yet that I know of. When ever/if he does I'll post them on my armbian post which I linked in an other post on/in this topic/forum. If your interested in any of the files I have on hand. I'd have to dig them out.
Last edit: 14 Nov 2019 01:07 by berin.
The following user(s) said Thank You: terry1992

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

More
18 Nov 2019 00:24 #150551 by terry1992
Sounds like the hm2_tkboard not include the GPIO driver of the Tinker board. So if I got the GPIO dirver I have to load it before I load the hm2_tkboard.

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

More
18 Nov 2019 00:35 - 18 Nov 2019 00:37 #150552 by berin
unless I'm mistaken I have a copy of the hm2_tkboard files. that are from the person who posted the lcnc using a tinkerboard. BUT.. THAT IS BASED on the mesa controller
Last edit: 18 Nov 2019 00:37 by berin.

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

More
19 Nov 2019 16:55 #150664 by viski

I have tried to get printer port address form the terminal.
Here is what I got
root@LinuxCNC-terry:/home/atech# cat /proc/ioports | grep parport
  0378-037a : parport0

So I tried the readhmid command. The result are as follows
atech@LinuxCNC-terry:~$ sudo mesaflash --device 7i90 --epp --addr 0x0378 --readhmid
[sudo] password for atech: 
failed to clear EPP Timeout!
EPP timeout on data cycle of read(addr=0x0000, size=4)
failed to clear EPP Timeout!
EPP timeout on data cycle of read(addr=0x0100, size=4)
failed to clear EPP Timeout!
No 7I90 board found

Is there anything wrong? Can anyone help me?


I have the same problem . Did you solved ?

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

More
20 Nov 2019 00:33 #150702 by terry1992
Yes, it have been solved.

I checked following items
1. turn the function of the parallel port to EPP 1.9
( in my PC, the function was blocked by default. It needs to change the bios version.)
2. make sure the wire is good and carefully connected.

good luck

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

Time to create page: 0.210 seconds
Powered by Kunena Forum