Skip to main content
Explorer II
January 8, 2024
Question

ethernet delay between the requenst and response

  • January 8, 2024
  • 3 replies
  • 4958 views

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

 

    This topic has been closed for replies.

    3 replies

    Graduate II
    January 8, 2024

    What's your OS' timing based on ?

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

    belarbiAuthor
    Explorer II
    January 8, 2024

    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

    Super User
    January 8, 2024

    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.

    belarbiAuthor
    Explorer II
    January 8, 2024

    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:

    Explorer
    May 28, 2024

    Did you solve the problem?