connect raspberry via ehternet as IO-port - some developer help needed

More
27 Jan 2019 13:43 #124966 by andypugh
All I can suggest is having a look at how the hm2_eth driver does it.

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

More
27 Jan 2019 14:59 #124972 by wicki

All I can suggest is having a look at how the hm2_eth driver does it.




it looks like it is sending at the IP-layer - not RAW:

board->sockfd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);

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

More
27 Jan 2019 15:25 #124974 by wicki
the results of the latency-test with this kernel:

Linux desktop 4.19.15-rt12 #1 SMP PREEMPT RT Tue Jan 22 23:20:37 CET 2019 x86_64 x86_64 x86_64 GNU/Linux

servo thread 1.755.872 755.872
base thread 247.494 222.494

ok, its working with a UHD-monitor in 4k - but these results
are looking unusable. for a nearly 4GHz i3...

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz
stepping : 9
microcode : 0x8e
cpu MHz : 3899.999
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips : 7824.00

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

More
27 Jan 2019 19:40 - 27 Jan 2019 19:41 #124985 by PCW
Such terrible latency suggests issues with power management, I would check that all
power saving options are disabled in the BIOS setup (including C states above C1)

Also it may be that your system/kernel cannot run a base thread as fast as the default
latency tests 25 usec (40KHz), since you do not expect to run a base thread on the host
PC, you may get better servo thread results by disabling the base thread when running the test:

latency-test 1ms 1ms
or
latency-histogram --nobase --sbinsize 2000

Another possibility is that you forgot to select "fully preemptable kernel" when you built your real time kernel...
Last edit: 27 Jan 2019 19:41 by PCW.

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

More
27 Jan 2019 21:37 - 27 Jan 2019 21:40 #124991 by vre
Last edit: 27 Jan 2019 21:40 by vre.

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

More
27 Jan 2019 21:41 #124992 by tommylight
This is what i get get from my latest computer assembled last 2 days an installed fresh about an hour ago:
Warning: very big picture ahead !



LinuxMint Mate 18.3
4.19.1-rt3
i7 7400
Asus PRIME Z270-a
XFX AMD RX580
M.2 SSD 256GB

Black stripes are between monitors (there are 4 EIZO 24" monitors connected, but using 3 ), have to figure out how to remove that void. I had an Asus GTX 1060 6GB on it yesterday and it has no voids in between monitors, great, but crapped out when booting Preempt-RT kernel.
Attachments:

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

More
28 Jan 2019 09:23 #125059 by wicki
something must be wrong....
on the i3, all energy-options in BIOS are disabled and
CONFIG_PREEMPT_RT_FULL=y
is set.

a rasPI is faster than an intel i3?
what the fuck is eating up my timings ?
the system is also really slow with this kernel in normal working
top - 10:22:16 up 1:20, 1 user, load average: 1,82, 2,04, 2,02

any ideas ?


Intel i3, 3.9MHz
4.19.15-rt12 #1 SMP PREEMPT RT
Tue Jan 22 23:20:37 CET 2019 x86_64 x86_64 x86_64 GNU/Linux

1ms max jitter: 154015
25us max jitter: 119058



Intel Atom D525, 1.8MHz
3.4-9-rtai-686-pae #1 SMP PREEMPT
Debian 3.4.55-4linuxcnc i686 GNU/Linux

1ms max jitter: 9886
25us max jitter: 13835


rapsberry PI. Model B
4.4.4-rt9-v7+ #7 SMP PREEMPT RT
Mon Mar 7 14:53:11 UTC 2016 armv7l GNU/Linux

1ms max jitter: 82333

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

More
28 Jan 2019 10:08 #125062 by andypugh
RTAI generally (but not always) gives better latency results than preempt-rt.
Though I have a PC that gives excellent (<8000mS) latency with preempt-rt. But it's a wierd one. (an "RM One" all in one PC intended for school use. I use it as a test-bed for Mesa cards, so it has a 5i25, 7i43 and 7i80 all attached.)

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

More
28 Jan 2019 10:30 #125063 by wicki

RTAI generally (but not always) gives better latency results than preempt-rt.


that's the reason, I tried to install RTAI 5.1 on the i3.

but it won't run.
it doesn't even boot :-(


the kernel crashes at bootup just after loading.
no crash-message, just frozen...
last visible message is an "RTC....."

futex hash table enties: 1024
pnctrl core:....
RTC time....

hmmm... a few lines before:
Registering ACPI NVS region....

maybe a ACPI-problem ?

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

More
28 Jan 2019 13:18 #125072 by andypugh
Does the LinuxCNC Live-CD run? That should be one way to get a working RTAI.

But you probably can't access the ethernet port in RTAI. Or, at least, not without a lot of work. However it might be useful work if it allows hm2_eth to work with RTAI.

Remind me why you are doing this again :-)

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

Moderators: PCWjmelson
Time to create page: 0.206 seconds
Powered by Kunena Forum