- Hardware & Machines
- Computers and Hardware
- linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
18 Jul 2022 13:20 - 18 Jul 2022 13:29 #247661
by xek
Replied by xek on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Hi there! I'm new to linuxcnc, however I know some esp-idf.
I tried to find a cheap linuxcnc-compatible board, but failed. The cheapest board ever available on the internets costs ~250$.
Then I found this thread and esp32 looks promising. I started porting github.com/jzolee/HAL2UDP code to native esp32-idf with native LAN8720.
I'm using WT32-ETH01 board with LAN8720 and RMII connection to esp32. One of the problems – it has low free io pin count.
I'll release the code in a day or two.
@jzolee
can you please share some contact info, I'd like to ask a pair of questions, please?
I tried to find a cheap linuxcnc-compatible board, but failed. The cheapest board ever available on the internets costs ~250$.
Then I found this thread and esp32 looks promising. I started porting github.com/jzolee/HAL2UDP code to native esp32-idf with native LAN8720.
I'm using WT32-ETH01 board with LAN8720 and RMII connection to esp32. One of the problems – it has low free io pin count.
I'll release the code in a day or two.
@jzolee
can you please share some contact info, I'd like to ask a pair of questions, please?
Last edit: 18 Jul 2022 13:29 by xek.
Please Log in or Create an account to join the conversation.
18 Jul 2022 19:53 #247723
by jzolee
Replied by jzolee on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Hi xek
Unfortunately, my English is poor, but I will try to answer: This email address is being protected from spambots. You need JavaScript enabled to view it.
Unfortunately, my English is poor, but I will try to answer: This email address is being protected from spambots. You need JavaScript enabled to view it.
Please Log in or Create an account to join the conversation.
19 Jul 2022 10:24 #247757
by xek
Replied by xek on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Well, this is my code for native esp32-mac with lan7820 PHY
github.com/ryba-xek/linuxcnx-esp32-idf/t...n8720_native_esp_idf
but it doesn't work in the real application because of the limitations in esp32 native ethernet stack buffers.
With hundreds of UDP packets incoming every second it is not able to reply this fast, so I see a lot of ENOMEM errors.
see docs.espressif.com/projects/esp-idf/en/l...wip.html#limitations
github.com/ryba-xek/linuxcnx-esp32-idf/t...n8720_native_esp_idf
but it doesn't work in the real application because of the limitations in esp32 native ethernet stack buffers.
With hundreds of UDP packets incoming every second it is not able to reply this fast, so I see a lot of ENOMEM errors.
see docs.espressif.com/projects/esp-idf/en/l...wip.html#limitations
This IMHO can't be fixed without an external MAC/PHY, so I'm switching to porting jzolee/HAL2UDP W5500 code to native esp-idf. And maybe with RMT.Calling
orsend()repeatedly on a UDP socket may eventually fail withsendto()equal toerrno.ENOMEM
Please Log in or Create an account to join the conversation.
25 Jul 2022 23:08 #248287
by eng
Replied by eng on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
I'm studying with esp32 and dds, at the moment I'm getting pulse rates higher than 260Khz, but my computer is latency orivel, the data transfer using the w5500 is perfect, I redid the communication using some information from .c from remora, everything works very well, but now I have to focus on a computer that gives me a good latency to keep my thread working with an acceptable value of 1000000ns, at the moment I have a value of 1100000 ns but I don't have package errors, only problem now is the latency because I have latency spikes that makes me have high times in my thread, I will also use pcf8575 to have more inputs and outputs, other than that everything working perfectly.
Please Log in or Create an account to join the conversation.
25 Jul 2022 23:25 #248288
by Bari
Replied by Bari on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
What are you using for a computer with the 1100000 ns latency?
Please Log in or Create an account to join the conversation.
25 Jul 2022 23:37 #248289
by eng
Replied by eng on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
I'm using google translator and maybe I have translation errors, I have max thread times of 1100000 Tmax, this value stays like this for a long time, but sometimes it gets higher due to the latency of my machine.
www.instagram.com/p/CgZgo2OpS0G/
www.instagram.com/p/CgZgo2OpS0G/
Please Log in or Create an account to join the conversation.
25 Jul 2022 23:51 - 26 Jul 2022 00:02 #248290
by Bari
Replied by Bari on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
I think I understand you and would like to help you reduce your latency. I just get a blank page loading your link. If it is a picture can you add it as an attachment using the "Go to editor.." button?
Last edit: 26 Jul 2022 00:02 by Bari. Reason: fix formatting
Please Log in or Create an account to join the conversation.
27 Jul 2022 21:05 #248466
by eng
Replied by eng on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
thank you for wanting to help, today I managed to study a little more and managed to improve communication, now we are getting a max thread of 800000, I also managed to pulse rates above 300khz but I will keep 100khz for safety.
Please Log in or Create an account to join the conversation.
27 Jul 2022 21:54 #248473
by Bari
Replied by Bari on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Ok, managed to get the video to load some times.
Please Log in or Create an account to join the conversation.
27 Jul 2022 21:58 #248475
by eng
Replied by eng on topic linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
this video is already old, I changed a few things and improved communication.
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Computers and Hardware
- linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
Time to create page: 0.100 seconds