- Posts: 3
- Thank you received: 0
linuxcnc-esp32 Software Stepping over Ethernet Using ESP32
4 years 3 months ago #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?
Please Log in to join the conversation.
4 years 3 months ago #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: juhasz.zoltan@freemail.hu
Unfortunately, my English is poor, but I will try to answer: juhasz.zoltan@freemail.hu
Please Log in to join the conversation.
4 years 3 months ago #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
orCode:send()repeatedly on a UDP socket may eventually fail withCode:sendto()equal toCode:errno.Code:ENOMEM
Please Log in to join the conversation.
4 years 3 months ago #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 to join the conversation.
4 years 3 months ago #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 to join the conversation.
4 years 3 months ago #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.
Please Log in to join the conversation.
4 years 3 months ago #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?
Please Log in to join the conversation.
4 years 3 months ago #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 to join the conversation.
4 years 3 months ago #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 to join the conversation.
4 years 3 months ago #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 to join the conversation.
Time to create page: 0.204 seconds
