- Posts: 170
- Thank you received: 54
LinuxCNC + Orange Pi (allwincnc)
- tjtr33
- Offline
- Elite Member
-
Less
More
5 years 10 months ago #193356
by tjtr33
Replied by tjtr33 on topic LinuxCNC + Orange Pi
i read that user faradaygv saw lost steps and attributed the error to timing relations. I examined the arisc_stepgen.c and .h code and saw there was no use of dir_setp or dir_change times. faradaygv said he had no errors using the gpio pins with stepgen. I checked and saw it was a standard stepgen, it justwas hal connected to gpio pins. So the lost steps are in the arisc stepgen and the arisc step gen doesnt respect the preconditions of the dir_setup and doesnt respect the postcondition of dir_hold. The code just looks like C so I will have a go at it. The install scripts do compile the code so edits should have an effect. Any comments?
The following user(s) said Thank You: Bari, aekhv, beardbird
Please Log in or Create an account to join the conversation.
- aekhv
- Offline
- Senior Member
-
Less
More
- Posts: 49
- Thank you received: 18
5 years 10 months ago #193360
by aekhv
Replied by aekhv on topic LinuxCNC + Orange Pi
Many people await someone who will add a support of dir_setup & dir_hold to arisc driver. I hope you are the chosen one!
Please don't stop.
The following user(s) said Thank You: beardbird
Please Log in or Create an account to join the conversation.
- Bari
- Offline
- Platinum Member
-
Less
More
- Posts: 639
- Thank you received: 234
5 years 10 months ago #193392
by Bari
Replied by Bari on topic LinuxCNC + Orange Pi
Sounds good. Maybe respecting the preconditions of the dir_setup and the postcondition of dir_hold is why the stepgen actually works in other examples vs ignoring this and having it almost work as it does in this example.
Please Log in or Create an account to join the conversation.
- tjtr33
- Offline
- Elite Member
-
Less
More
- Posts: 170
- Thank you received: 54
5 years 9 months ago #193959
by tjtr33
Replied by tjtr33 on topic LinuxCNC + Orange Pi
Happy 2021. I am studying the stepgen codes. Both JMKasunich's original ( because it repects the pre and post step timing rules for DIR changes,
And studying the arisc-stepgen because it can reside in the arisc side of the opi's brain.
Right now i'm working on the "DDS" methods used to determine when changes can occur. Its a bit complex for me. Theres some clever & tricky code in here.
And studying the arisc-stepgen because it can reside in the arisc side of the opi's brain.
Right now i'm working on the "DDS" methods used to determine when changes can occur. Its a bit complex for me. Theres some clever & tricky code in here.
The following user(s) said Thank You: Bari, aekhv
Please Log in or Create an account to join the conversation.
- tjtr33
- Offline
- Elite Member
-
Less
More
- Posts: 170
- Thank you received: 54
5 years 9 months ago #194567
by tjtr33
Replied by tjtr33 on topic LinuxCNC + Orange Pi
Hello, I have not gotten a new stepgen for arisc. BUT i looked at the gpio driver and ran some tests. I ran latency-histogram --base nnnn --servo 1000000, meaning I played with the base thread. This is on a OPi+2e booted with isolcpus=1,2,3 idle=poll and the speed forced to max. I found Unexpected RealTime errors at 20 25 30 40 50 60 80 and 90 uS base thread. I ran with 100uS base and got none. I ran for 2 days and got none ( No teasing the bears with glxgears youtube file transfers, no teasing at all ). Then i did some calculations, i figured I could get 75 mm per sec ( my 1.5mmpitch screws are .0075mm per step full step ) I needed doublestep ( and the orange cnc gpio dirver has this. The stepgen used is the standard linuxcnc stepgen ( not arisc ). I made a set of files with base 1000000 servo 1000000 and max vel 75mm/sec, scale 133.3333. The acc and max_acc were quite hig(i am running tests right now and wont tease the bears to look atthe .ini or .hal). BUT I have run a special 3DChips modified to loop 100times and to print out the counter as it decrements each iter. I have been running this ... today is 3rd day without any UXRTdelys, fullscreen, no teasing. Vel hits 4500mm/min on the straightaways. Summary, The OPI+2e can run pretty well with caveats. With single 3DChips the Axis display is quickly scaled and rotated. With the 100x loop Axis is sluggish and the toll jumps between video updaes. So dont throw away your OrangePi's. HTH tjtr33
The following user(s) said Thank You: Bari, tommylight, Trihwangyudi1990
Please Log in or Create an account to join the conversation.
- Bari
- Offline
- Platinum Member
-
Less
More
- Posts: 639
- Thank you received: 234
5 years 9 months ago #195178
by Bari
Replied by Bari on topic LinuxCNC + Orange Pi
We had Xenomai on the Allwinners 6 years ago (Cubieboards) at 40,000nS worst case latency jitter while playing videos. This was before the open mali driver and before the ARISC was used or even mentioned in any specs.
Doing this the right way means finding and building a kernel version that is stable and has low latency with preempt_rt or Xenomai. The Armbian and Raspbian devs don't seem to care about low latency.
U-boot should also be properly built for low latency and not even support options that raise latency. It is lots of work and time to do so and unfortunately we don't have the time to work on this here.
Thanks again for catching the problems with the device tree blob.
Doing this the right way means finding and building a kernel version that is stable and has low latency with preempt_rt or Xenomai. The Armbian and Raspbian devs don't seem to care about low latency.
U-boot should also be properly built for low latency and not even support options that raise latency. It is lots of work and time to do so and unfortunately we don't have the time to work on this here.
Thanks again for catching the problems with the device tree blob.
Please Log in or Create an account to join the conversation.
Time to create page: 0.567 seconds