Real-Time Architecture Question

Luiz-Villalobos
Posts: 1
Joined: Mon Jun 20, 2022 3:38 pm

Real-Time Architecture Question

Postby Luiz-Villalobos » Mon Jun 20, 2022 4:56 pm

I'm currently in the early stages of development of a system that is required to sample and process data at a very consistent rate, in the kHz range. There are still a few open questions regarding system architecture, and I wanted to get an opinion here. One of the options presented is to have the ESP32, that is doing the sampling/data-handling, also communicating via ethernet. My question is, could the ESP32 guarantee the sampling rate and processing while still communicating via ethernet? If not, would anyone have a better recommendation for an architecture to communicate with the devices?

Thanks a lot for the help!

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Real-Time Architecture Question

Postby ESP_Sprite » Tue Jun 21, 2022 2:52 am

Can you define what 'real-time' means in this case? Sample rate (and sampling from where), max latency etc are important.

Stef_Esp32
Posts: 6
Joined: Tue Jun 21, 2022 9:26 pm

Re: Real-Time Architecture Question

Postby Stef_Esp32 » Wed Jun 22, 2022 12:30 pm

Indeed, define more exactly what your requirements are.

1kHz sampling is not very fast for a 200MHz processor, as long as you have no blocking code in, for example, your ethernet (TCP/IP) stack. On a dual core processor (which most ESP32 are) you can run your sampling on one core and ethernet on the other, reducing the real time requirement on the ethernet stack. But you need communication between the cores which can be tricky. I have no experience with this on an ESP32, but did something similar on a dual core arm processor.

Regards,

Stef
--
Stef

Who is online

Users browsing this forum: No registered users and 119 guests