What is portTICK_PERIOD_MS in FreeRTOS

1. vTaskDelay(1000);

- This line of code introduces a delay using the FreeRTOS function `vTaskDelay`.

- The argument `1000` specifies the delay in FreeRTOS ticks. However, the actual duration of each tick is dependent on the FreeRTOS configuration for your specific platform.

2. vTaskDelay(1000 / portTICK_PERIOD_MS);

- This line also introduces a delay using `vTaskDelay`.

- The argument `1000 / portTICK_PERIOD_MS` specifies the delay in milliseconds. The division by `portTICK_PERIOD_MS` is crucial for portability.

- `portTICK_PERIOD_MS` is a constant that represents the duration of one tick in milliseconds for the specific FreeRTOS port you are using. This ensures that the delay is consistent across different platforms with varying tick rates.

In summary, both lines can work, but the second line with the division by `portTICK_PERIOD_MS` is more portable and adjusts the delay based on the specific tick rate configured for FreeRTOS on the target platform. This is particularly important if your code needs to run on different systems with potentially different tick rates.