I'm working on a project that uses Renesas RA6M5 MCU. The FreeRTOS is 10.4.3.I'm trying to figure out the difference between vTaskDelay() vs R_BSP_SoftwareDelay(). The vTaskDelay() is a function from FreeRTOS. Do these two functions do the same thing? I need to delay a period of time in one task. But I prefer to give the CPU time to other tasks during the delay. Which one will do what I need?
Namely, which one should I use?vTaskDelay(pdMS_TO_TICKS(1000));
OrR_BSP_SoftwareDelay(1000, BSP_DELAY_UNITS_MILLISECONDS);
Thanks!
The BSP function only provides a tight-loop with the proper timing, in which the CPU is busy processing the loop. This should really only be used for very short delays.
The FreeRTOS function should relinquishes the CPU so that other tasks can be executed, assuming the proper configuration. As such, this should be what you want to use.
Thanks Jim. I appreciate it.
Yes, I used the vTaskDelay() to replace the R_BSP_SoftwareDelay().