Raspberry Pi 4

More
12 Mar 2020 00:06 - 12 Mar 2020 14:59 #159831 by jj80909
Replied by jj80909 on topic Raspberry Pi 4
thadwald & BeagleBrainz...thank you!

Opening the S.D. card on my windows computer allowed me to edit the cmdline.txt file...as I thought, I left out a space when appending the line! Stupid mistake.
Last edit: 12 Mar 2020 14:59 by jj80909.

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

More
12 Mar 2020 22:30 #159946 by blazini36
Replied by blazini36 on topic Raspberry Pi 4

Peter,
Assuming that i can get the latency issues worked out. Do you see any issues running Pi4 4gb reliably with ethernet based Mesa boards and PWM signal generation?


I have not done much work with the RPI4 over Ethernet, just SPI.
Forum member skunkworks has been running a RPI4 with a 7I92 for a few
Months now and I don't believe he has any major issues _but_
he did need to run the servo thread at 2 ms (500 Hz) rather than
the standard 1 ms (1 KHz). This may or may not be an issue depending
on the required acceleration. I have been running SPI based cards at 1 KHz
without issue, though you cannot get away with running videos at the same
time as LinuxCNC is running.


That's interesting. Is the SPI interface "generic" meaning that it's not specific to the rpi? There are plenty of more powerful SBCs than the Rpi, I'd be curious if they can work with the hm2 spi interface. Maybe not physically with the GPIO headers but if they were wired up as such would they likely work?

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

More
12 Mar 2020 23:16 #159954 by andypugh
Replied by andypugh on topic Raspberry Pi 4

That's interesting. Is the SPI interface "generic" meaning that it's not specific to the rpi?


To an extent. I think that the LinuxCNC-side SPI driver would need to have things like pin and registers changed to work with a different SBC, but the Mesa card would be entirely unaware what was on the other side of the interface.

Also the LinuxCNC Hostmot2 driver is very well abstracted to not care what interface the hardware is on. For example the identical code runs the stepgens on cards connected by SPI, Ethernet, Parallel port or PCI.

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

More
12 Mar 2020 23:48 - 12 Mar 2020 23:48 #159962 by PCW
Replied by PCW on topic Raspberry Pi 4
The hm2_rpspi driver is RPI specific, but the hm2_spi driver is generic
(it uses the kernel SPI driver) The issue with hm2_spi is that the kernel
driver may or may not be written with real time considerations.
For example on a RPI, the hm2_rpspi driver has considerably better
performance than the hm2_spi driver

It might be worth trying hm2_spi on some random SBCs
Last edit: 12 Mar 2020 23:48 by PCW.
The following user(s) said Thank You: rdtsc

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

More
13 Mar 2020 09:03 #159998 by creisey
Replied by creisey on topic Raspberry Pi 4 & 7i90
could anyone help me to write a step by step tutorial for noobs.

golden goal is Raspberry pi > MESA 7i90 via SPI (7i90 has already SPI Firmware)

my backgroud is tooldesigner and im a linuxcnc hobbyist.

What i know so far:

1. grab an raspi -image
www.raspberrypi.org/downloads/raspbian/

2. install Preempt-RT kernel
github.com/lemariva/RT-Tools-RPi

3a. install linuxcnc
here it already gets problematic
wiki.linuxcnc.org/cgi-bin/wiki.pl?RaspberryPi
is not working anymore

3b. install linuxcnc form source
github.com/LinuxCNC/linuxcnc
here it would be great to have some steps by steps

4. install mesaflash to check connection:
github.com/micges/mesaflash
sudo mesaflash --device 7i90 --spi --addr /dev/spidev0.0 --readhmid

output should be alike:

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

and so on
....

5. then install modified hm2_rpspi.c & spi_common_rpspi.h:
forum.linuxcnc.org/18-computer/36879-ras...pi-4?start=60#141371

6. check connection form hostmot2
halrun -I

within halcmd:
loadrt hostmot2
loadrt hm2_rpspi

and it should print out the config of 7i90

this guide is not complete and i'd like to make it seamless for people like me. could you please help me.

thx

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

More
13 Mar 2020 11:11 #160002 by phillc54
Replied by phillc54 on topic Raspberry Pi 4 & 7i90

3b. install linuxcnc form source
github.com/LinuxCNC/linuxcnc
here it would be great to have some steps by steps

There are LinuxCNC build instructions here linuxcnc.org/docs/devel/html/code/building-linuxcnc.html
The following user(s) said Thank You: creisey

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

More
13 Mar 2020 11:45 #160003 by BeagleBrainz
Replied by BeagleBrainz on topic Raspberry Pi 4 & 7i90
Have you seen or tried this
gnipsel.com/linuxcnc/uspace/rpi4-rt.html
The following user(s) said Thank You: Turambar25

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

More
13 Mar 2020 15:44 #160029 by creisey
Replied by creisey on topic Raspberry Pi 4 & 7i90
not yet, sounds promissing.

im very curious of the parts after the installation of lcnc.

is my part 5 correct?

with halcompile --compile and the hm2_rpspi.c & spi_common_rpspi.h

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

More
13 Mar 2020 16:34 #160045 by BeagleBrainz
Replied by BeagleBrainz on topic Raspberry Pi 4 & 7i90
Rpi aren’t my thing.
One thing I do know of is that one of the guys on the mailing lists is putting together pre made images for the Rpi.
You’d have to join the mailing lists, links are under community on the linuxcnc home page.

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

More
13 Mar 2020 16:53 #160050 by PCW
Replied by PCW on topic Raspberry Pi 4 & 7i90

not yet, sounds promissing.

im very curious of the parts after the installation of lcnc.

is my part 5 correct?

with halcompile --compile and the hm2_rpspi.c & spi_common_rpspi.h


No, the drivers are compiled as part of LinuxCNC
(though I suggest using LinuxCNC 2.9 as it has the latest RPI4 support)
The following user(s) said Thank You: creisey

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

Time to create page: 0.161 seconds
Powered by Kunena Forum