FreeRTOS TCP/IP with tickcount < 1mS

If we configure the TickCount < 1ms, the portTICK_PERIOD_MS is zero, but in FreeRTOS TCP is this used.

whould it not better, if FreeRTOS TCP use the pdMS_TO_TICKS incase of portTICK_PERIOD_MS?

Yes sure it is better to use the macro pdMS_TO_TICKS(), Here without the usual casts:

#define pdMS_TO_TICKS( xTimeInMs ) \
        ( ( ( xTimeInMs ) * configTICK_RATE_HZ ) / 1000U )

The macro portTICK_PERIOD_MS is being used less and less.

But also I would like to say: think twice before you increase the clock-tick speed. If you want a precise measurement of time, it is much better/cheaper to use a hardware timer.

And if something must happen exactly at a certain moment, you can also use the interrupt to wake-up a task ( using task notification ), and make sure that the task has a high-enough priority so it can run.

There is clear, that this whould possible to use the task notification to wakeup a task at 100us. But in this case, the there we whouldn’t have the possible the timemeasure from FreeRTOS of 100uS. For Excample sleep 200uS and so.

I whould propose, that this 3 possition, where FreeRTOS TCP use the portTICK_PERIOD_MS replace with pdMS_TO_TICKS, like it’s done in the FreeRTOS Kernel