linuxcnc-esp32 Software Stepping over Ethernet Using ESP32

More
4 years 3 months ago #247757 by xek
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

Calling 

Code:
send()
 or 
Code:
sendto()
 repeatedly on a UDP socket may eventually fail with 
Code:
errno
 equal to 
Code:
ENOMEM
.

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.
More
4 years 3 months ago #248287 by eng
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.
More
4 years 3 months ago #248288 by Bari
What are you using for a computer with the 1100000 ns latency?
More
4 years 3 months ago #248289 by eng
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.
More
4 years 3 months ago - 4 years 3 months ago #248290 by Bari
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: 4 years 3 months ago by Bari. Reason: fix formatting
More
4 years 3 months ago #248466 by eng
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.
Time to create page: 1.683 seconds
Powered by Kunena Forum