cancel
Showing results for 
Search instead for 
Did you mean: 

ethernet delay between the requenst and response

belarbi
Associate II

HELLO,

I'm using the stm32H755zit6 nucleo144 board, and I'm trying to communicate with the PC throw ethernet, all is working fine but the delay between the request and response is not enough for our application it's between 1ms  to 0.5ms and we need at least (0.1ms or 0.05ms), I don't know where the code is spending all this time, can anyone help me please?

The code was generated using STM32CubeMX 6.9.0 and STM32CubeIDE 1.14 with the package v1.11.0

 

5 REPLIES 5
LCE
Principal

What's your OS' timing based on ?

How's your PC side optimized ? Buffers, priorities...

the OS' timing based on TIM7, on STM32,

for the PC I'm using Wireshark to capture the frames, and MATLAB SIMULINK to receive and send data from the instrumental library its time base is the timestamp configured in the solver, I'm sending a sine wave with 1Hz frequency, actually the datatype is a double then we are sending 8 bytes each 0.01 seconds

TDK
Guru

Doesn't look like you're initializing TIM7 at all in your code. How are you using it for timing? Using an interrupt-based system would be faster, rather than an infinite loop inside a thread which polls for the received packet.

Would expect matlab and windows to be the primary source of delays here--neither is guaranteed to respond quickly.

More details on the timing would be interesting. Where are the 0.5-1ms values being picked from? Screenshot or similar.

If you feel a post has answered your question, please click "Accept as Solution".

I'd selected the TIM7 as the base time for the cortexM7 because I have activated the free RTOS, and it doesn't need any initialization because it's a timer with general purpose, we need just to activate it,

the screenshot about the delay between the request and response joined below:

ioncasu
Associate II

Did you solve the problem?