Can the OPI5 be Configured to Run LCNC?

More
17 May 2023 23:29 #271580 by Guglielmi
Ah, ok.. tomorrow I will try step by step, for example, I try to disable FIQ0 without enable S2..

in boot.cmd I have:
line 26: if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
line 27: if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS2,1500000 ${consoleargs}"; fi

correct? finally based on your suggestion we have console=display, so the second line should not executed..
I found that with last version of kernel it's changed here.. but I don't want to rebuild all..

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

More
17 May 2023 23:41 #271582 by royka

If it helps, the Odroid N2+ I played with had BIG/LITTLE cores, first 4  cores were big, last 2 little. 
Best performance was isolcpus=2,3,4,5

Ok did the preempt_rt kernel work? That's funny I would've thought that isolcpus=0-3 irqaffinity=4 or 5 works better in that case, probably it's not as simple as I thought. For the Opi5 it might help indeed to isolate 4-7 instead of 5,7.
How was the latency on the s922x? Did a test with the s912 which worked surprisingly well, perhaps that kernel also works on the s922x

 

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

More
17 May 2023 23:48 #271583 by royka
Yes that's right, at line 11 you'll see: setenv console "both"

So without console=display it will enable display and serial. armbianEnv.txt overrides what's in boot.scr

You could edit boot.cmd and recompile (see last line), but it's easier to edit the armbianEnv.txt

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

More
18 May 2023 00:14 #271584 by rodw

If it helps, the Odroid N2+ I played with had BIG/LITTLE cores, first 4  cores were big, last 2 little. 
Best performance was isolcpus=2,3,4,5

Ok did the preempt_rt kernel work? That's funny I would've thought that isolcpus=0-3 irqaffinity=4 or 5 works better in that case, probably it's not as simple as I thought. For the Opi5 it might help indeed to isolate 4-7 instead of 5,7.
How was the latency on the s922x? Did a test with the s912 which worked surprisingly well, perhaps that kernel also works on the s922x

 

I tried all combinations :)
You should never isolate Core 0 as there are a number of system interrupts tied to it.
Yes, we did compile a good preempt_rt but had a regression so have not got back to it due to other projects!
I was hoping Leonid my Armbain mentor might have fixed it in the mean time  :(
 

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

More
18 May 2023 00:58 #271585 by royka
It seems that's not always the case, Google on "isolcpus=0",
irqaffinity=4,5 might help for that.

The kernel I'd compiled for s9xx:
mega.nz/folder/qshRQAbR#0p25gwbiAXH41v2ZB6fZMg

Hopefully you'll get it working, would be nice to see more much better rpi4 alternatives.

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

More
18 May 2023 01:52 - 18 May 2023 02:08 #271589 by echristley
www.hobby-machinist.com/threads/bridgepo...c-conversion.106311/

And so the work begins. I've all all the parts (I think), to get this conversion done.
The first step is to LinuxCNC running on this OPi5. I'll be following royka's previous instructions, found here 

The forum doesn't seem to be picture friendly.  You can link, but not add one to a post.  So, I'm going to keep the picture heavy, blow-by-blow rundown of my process here
Last edit: 18 May 2023 02:08 by echristley.
The following user(s) said Thank You: royka

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

More
18 May 2023 03:01 #271591 by rodw
You can add images by clicking on the attachments button but there is a limit on the size so you might have to downsample tose 36 Mp images 

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

More
18 May 2023 10:17 - 18 May 2023 10:18 #271600 by Guglielmi
I found a solution for ttyS2!
I tested the ttyFIQ0 and it works as additional port (3 pins beside GPIO). Building the overlay that just disable that port, it disappears correctly.
When I add the second part where uart2 is enabled the OPI5 doesn't boot. So I tried a different way.. just renaming ttyFIQ0 to ttyS2 and it worked.
Sure it's not a very elegant solution, I should rename it after every boot, I placed it in the driver.. but finally works.
The signal is quite bad compared to other serials, it's slow to go up, I can see pulses really rounded but I will check with a RS232-RS485 converter.
There is a better way to just rename that "file" when it is created? ..or inside the overlay?
Last edit: 18 May 2023 10:18 by Guglielmi.

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

More
19 May 2023 00:57 - 19 May 2023 01:24 #271639 by echristley
Tonight, I visited a buddy. We're both "techno hoarders". Neither of us want to throw away something that might be useful in the future. He got a Enco tapping jig, that I got with the mill. I got two FRP electronics enclosures, relays, cables, connectors, bus bars, fuse holders, and a few other odds and ends. None of that stuff seems expensive, until you have to outfit a build with it all.

When I got home, following the LinuxCNC install directions posted in the OP, I installed the Arbiam OS on the OPi5. I had to download and install Belena Etcher, a program for writing the images to SD cards. The RaspberryPi writer wouldn't work. Said the image was corrupted. Anyway, on the other computer right now, I'm watching a This Old Tony video, the one where he tries to replace the ball bearings in a ball nut. He's such a hoot. In the background, I have the linuxcnc latency test running and have 20,312 in the servo thread and 7,375 in the base thread.

I haven't figured out how to post a picture to this forum, but with six glxgears running, and browsing this forum with Firefox ESR This is with nothing more that royka's image, and the installation of linuxcnc-uspace.  Is wayland really needed?

 
Attachments:
Last edit: 19 May 2023 01:24 by echristley.

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

More
19 May 2023 13:32 - 19 May 2023 13:33 #271672 by echristley
I changed the isolcpus to 2,5,7 and got essentially the same results. After the screenshot, I got a few outliers out to +-12us when I loaded some videos and browsers and stuff. That is about what I'm getting this morning with the updated settings.

Looking at what people are reporting from other computers, I think I can call this good enough for now and move on to the next steps? Linking the GPIO pins to the BOB and getting them configured to drive steppers?  I think for that I need the dtb prepared by Guglielmi (I think)?
Last edit: 19 May 2023 13:33 by echristley.

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

Time to create page: 0.289 seconds
Powered by Kunena Forum