So, Normal communication with that module using ESP32 is UART but to upgrade. I am trying to break down the fundamental features of freeRTOS (e. h> #include <semphr. Unless the delay is very many microseconds, you wouldn’t be able to shift to another task, and even that would require something to generate an interrupt at the end to force the switch back. Posted by heinbali01 on November 3, 2015. vTaskDelay for 1uS, possible?Posted by willywortel on December 3, 2008First of all, thanks everyone for the response so far. If you call vTaskDelay ( 1 ) then you are on the limit of the resolution and the period you delay for will depend on where in the current time slice the. B. After much struggling I found that vTaskSuspendAll (); and xTaskResumeAll (); works but only as long as no delays are used. August 15, 2022. Understanding the vTaskDelay help. 2. eg. この時間は設定で最低1msまでの調整が可能だった。. I call vTaskDelay for various reasons. 1. This toolkit has a file where user should define sono wrapping function and in embedded system the function to be wrapped are: ~~~ /*****/ /*!. status code that indicates the execution status of the function. You can easily find or write a piece of code that delays for 12500 nanoseconds (+/-62. You really helped me out!. vTaskDelay (5000/portTICK_RATE_MS); // Delay for 5 seconds. The tickless mode. 100 microseconds interval. If the function is true I don’t try and sleep. Multiple Task SynronisationPosted by jdurand on November 19, 2012A couple of ways… You could create the new tasks inside task 1 when it’s […]I would not kill the first task when the second starts. Connect and share knowledge within a single location that is structured and easy to search. while (true) { esp_timer_dump(stdout); vTaskDelay(pdMS_TO_TICKS(1000)); } Compiling the Sketch Hi, I have several tasks in freeRTOS on my ESP32 delaying with the vTaskDelay-function. 이 함수는 vTaskDelay() 와 다른 중요한 점이 있다. Espressif ESP32 Official Forum. h) will allow you to busy-wait for a correct number of microseconds. I am currently learning FreeRTOS and I wanted to integrate as a task the code from the ultrasonic distance measure(HC SR04) example and simply print it into the serial, but at some points it measures wrong. It is based on the RTOS tick rate. vTaskDelay (5000 / portTICK_PERIOD_MS);} but if i use: while (true); the interrupt is fired. Understanding the vTaskDelay help. I was wondering how I can delay for longer periods of time using freertos function vTaskDelay(). Microsecond delay within task Actually, we have connected one module over UART with ESP32 chip in our product. c file, there is a define named IDLE_TASK_SIZE. 1. This could change in future Arduino releases. #include <time. 1 or // 2 microseconds) gives delays longer than desired. Vinay, Have you tried using a dedicated timer peripheral? Based on the Technical Reference Manual, you should be able to configure a timer to use a 27 MHz clock. Then we can likely propose a good way of solving your problem. Hello, i have a problem in getting up FreeRTOS for PSoC4: the vTaskDelay(pdMS_TO_TICKS(500)); -> never return. Task switching is performed because the FreeRTOS vTaskDelay is used. Idahowalker:Understanding the vTaskDelay help. The code simply reads an input on the serial port and returns it with some extra text. number of microseconds since underlying timer has been started . Microsecond. This is the better option when executing multiple tasks, which is usually the case in FreeRTOS. Microsecond to Second Conversion Example Task: Convert 1,500,000 microseconds to seconds (show work) Formula: microseconds ÷ 1,000,000 = seconds Calculations: 1,500,000 microseconds ÷. Get time in microseconds since boot. Re: vTaskDelay () vS. If you want something faster you would need to use a peripheral timer. If there is still not enough data then the task re-enters the Blocked state, and xTaskCheckForTimeOut () is used to re-calculate the Block time to ensure the total amount of time spent in the Blocked state does not exceed MAX_TIME_TO_WAIT. In sleep mode, the ESP32 RTC memory functions, while the ESP32 microcontroller CPU and memory are disabled. The esp32 has WiFi and ESP-NOW active at the same time, receiving some data from another esp32. Posted by davedoors on August 20, 2013. It appears that simply using taskENTER_CRITICAL (); and taskEXIT_CRITICAL (); from the FreeRTOS docs does not work because of the way FreeRTOS is modified for ESP32. Post by davdav » Thu Nov 22, 2018 10:59 pm . -- So I have a big pile of spaghetti here (link to sketch dump). h> // define two tasks for Blink. But, I need to 500 or 100 us delay function. vTaskDelay () is better for long or imprecise delays, because it lets another task wake up and run while the first task is suspended. Let me know if anyone has any idea for that. 0. I can't find a similar command anywhere. cpp 📋 Copy to clipboard ⇓ Download. FreeRTOS is an open source RTOS (real-time operating system) kernel that is integrated into ESP-IDF as a component. Re: If vTaskDelay is called,will esp32 enters the modem sleep state? Modem sleep should work when radio is not needed regardless of whether task is paused. Anyway the timer ISR is always fired correctly. However, I've read that it’s best to avoid such high tick rates, due to the context switching delays. Returns. It is simply not possible to block using FreeRtos APIs for less than one tick (one tick = 10ms by default; can be lowered to 1ms, but not less). One of the first solutions I thought about was to increase the tick rate to 10kHz and use vTaskDelay(1) to create the intervals, while. the stepper_task never receives another message from the queue. Please take a step back and describe with a broader view what you are trying to achieve. // Sleep for 200 milliseconds. many thanks in advanceHello, currently working on a ESP32 Adafruit feather running FreeRTOS in an effort to log accel. in most typical application. This function differs from vTaskDelay () in one important aspect: vTaskDelay () specifies a time at which the task wishes to unblock relative to the time at which vTaskDelay () is called, whereas vTaskDelayUntil. This broke the real-time behaviour on my Arduino Mega because it now uses vTaskDelay() under the hood, and on the Arduino Mega, there is no real SysTick (here, the watchdog timeout with a resolution of 15 ms is used), what. LIS3DH accel hooked up using I2C, SD card hooked up using SPI (Feather hat RTC+SD card). ("MICROSECONDS","time in miliseconds=%lli",task_execution_start); // HERE BUNCH OF THINHS HAPPENING SUCH AS TOGGLING RELAYS, PRINTING VARIOUS STATES. As soon as you need to do a few things at the same time, you. The other code is very big for posting (I may post if require). - Tasks running on device but which do not use vTaskDelay: xTaskCreate(uart_task, "uTsk", 3500, NULL, 11, &UART_TaskHandle); -> no vTaskDelay used xTaskCreate(GSM_uartTask, "UauxTsk", 4096, NULL, 11, &GSM_TaskHandle); ->. Hi, it's me again with more stupid questions. Try publishing a constant string each time, rather then creating a new string each time. This is vTaskDelay ( pdMS_TO_TICKS ( 10 ) ) a delay of 10mSec, this vTaskDelay ( 10 ) is a delay of 10 clock ticks. mk","path":"main/component. (acc @Clifford: ) They both are entirely different functions by different developers for different purposes. vTaskDelay help. If it is false then I wait 60 microseconds and then continue. See the configTICK_RATE_HZ configuration option. in the interrupt, you can yieldfromISR , taskgivefromISR etc this way you can get a deterministic hard RTOS . Supports: periodic task execution (with dynamic execution period in milliseconds or microseconds – frequency of execution), number of iterations (limited or infinite number of iterations), execution of tasks in predefined sequence, dynamic change. This toolkit has a file where user should define sono wrapping function and in embedded system the function to be wrapped are:2) It takes longer to finish than the repeat period, at which point the vTaskDelay Until doesn’t block, but just updates the next execution time an returns. This will guarantee very precise timing except when. But, toggling a diode every 125 us is already a problem with FreeRTOS kernel running alongside (a lot of jitter, oscilloscope screen shows a mess). This function differs from vTaskDelay () in one important aspect: vTaskDelay () specifies a time at which the task wishes to unblock relative to the time at. Delay a task for a given number of ticks. converted the time into number of ticks as follows: taskDelay ( (int) (dwMicroSeconds/1000000)* sysClkRateGet ()); But In my case, The above will always be zero because i need to delay a. FreeRTOS is a professional grade, small footprint, open source RTOS for microcontrollers. Por ejemplo, digamos que el contador de ticks del sistema vale 50 en el momento de la llamada , y que tú quieres que la tarea se duerma durante 100 ticks. g. n Disassembly of section . Top. g. BC OnLine Partnership Office E161, 4000 Seymour Place PO Box 9412, Stn Prov Govt Victoria, BC V8W 9V1void vTaskDelay (const TickType_t xTicksToDelay) ¶ Delay a task for a given number of ticks. Thannks! vTaskdelay (), vTaskdelayuntil () call doesn't work on MPC5748G. Because the largest number you can store in a 16bit unsigned integer is 65535, the longest I can delay for is a little under 2 hours. Menu Quick Start Supported MCUs. Furthermore, ESP-IDF. Technique #4 – Use RTOS yield function. One of the issues you have here is that a vTaskDelay(1) will delay for at least the inverse of the FreeRTOS tick frequency, which by default is 100mS. If you have a periodic timer that executes every 3 ticks, and you block the timer task for 4 ticks, then naturally you. 001 Seconds: 1000000 Microseconds = 1 Seconds: Embed this unit converter in your page or blog, by copying the following HTML code: convertliveRe: vTaskDelay. The ROM function ets_delay_us () (defined in rom/ets_sys. mk","contentType":"file"},{"name":"lame_test. theskaz. So my configTICKRATEHZ is default -> (TickType_t) 1000) Can i implement in terms of FreeRTOS a delaymicrosecnods function? Freertos makes use of SysTickHandler. Then when the task wakes up it could check the RTC and delay a little longer as needed. 20 Milliseconds = 20000 Microseconds. CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ. Kind regards. Hello, I came across the same problem as davdav: I am using a lot of things that are accessed by spi: WiFi uses nvs, application reads nvs every second, esp_vfs_fat_spiflash_mount() at application startup, linenoiseHistorySave() for console and fopen(), fprintf() occasionally. Delay a task until a specified time. This would imply that your code is looping through this block many times without giving up focus. Post by zazas321 » Wed Mar 16, 2022 6:51 am . 9 and 1. @Perehama and @gfvalvo I am using ESP32. Understanding the vTaskDelay help. vTaskDelay () specifies a time at which the task wishes to unblock relative to the time at which vTaskDelay () is called. The ROM function ets_delay_us() (defined in rom/ets_sys. Posted by richardbarry on January 26, 2012. A única opção não recomendada é um loop baseado na função millis (). The main, call some initialization functions, create the task and then call. This will guarantee very precise timing except. MainTask runs only onces. First execution ended at 30534 and the second one starts at 30534 too. Difference between vTaskDelay and vTaskDelayUntil. vTaskDelay is no good for small mS delays. rokmarko mentioned this issue on Nov 8, 2021. Properly disconnecting from the MQTT Broker is nice, especially with out a Last Will and Testament and properly closing the network connection is an OK thing do. This is the second part of a series of ESP-IDF tutorials that I will complete as I learn stuff. To use scheduler for delay you have to check ready tasks list and (if necessary). The code runs very fast until it casues a stack overflow and resets the esp. Description. The parameter in vTaskDelay is the delay period in number of ticks from now I'm totally new to programming and electronics, it would be very helpful if someone helped me figure this out. Understanding the vTaskDelay help. To get an actual date however, you'll need to consult your development board and see if it has an RTC. I encountered the same problem. I have implemented tickless using an external oscillator and my own vPortSuppressTicksAndSleep function (mostly just the version used by ASF and others online). Besides, running a timer every few tens of microseconds leaves nearly no time for the system to do other things. h . A typical method is to call vTaskNotifyGiveFromISR () to wake-up a task from within an ISR. – Codo. See the RTOS Configuration documentation for more information. If a task changes a higher-priority task to the running state, the higher-priority task will not. This macro generates a timeout delay that instructs a kernel API to wait up to t microseconds to perform the requested operation. The actual time that the task remains blocked depends on the tick rate. Postby lesyeux » Fri Jun 23, 2023 2:30 pm. sdk_os_delay_us () is better for very precise short delays, you can also surround such a call with vTaskEnterCritical / vTaskExitCritical to disable interrupts. Follow asked Dec 28, 2019 at 11:39. 0 and port files SourceportableRVDSARM_CM4F (imported via RTE Keil). (flag) { printf("%lu ", pwm_value); // flag = false; // } vTaskDelay(50 / portTICK_RATE_MS); } } void attachInterupt(uint8_t gpio. One big issue is that the cost to run the scheduler can easily be big enough on many processors that such a delay is impractical. h . . For example, specifying a block period of 100 ticks will cause the task to unblock 100 ticks after vTaskDelay () is called. delayMicroseconds() works in arduino. In vTaskDelay you say how long after calling vTaskDelay you want to be woken . If you just call taskYIELD () then you are not delaying so FreeRTOS will just choose the same task to run again. For example, if task execution time is 50ms, then the delay will be 1950ms2. Parameters:vTaskDelay () specifies a time at which the task wishes to unblock relative to the time at which vTaskDelay () is called. I’ve updated my delay library to support milliseconds and microseconds delays. Board). When i put the function in a continuous loop, without delay calls, then it works correctly. One of the most used (and abused) functions in the Arduino world is the notorious delay () This function is as simple to use as harmful and deleterious for our projects because it's blocking and while the microcontroller is busy. You should use it if you are using arduino, and also you should post in the arduino forum. I managed to get USB HID working under FreeRtos. I have ensured that this is the only task with priority 1. gfvalvo February 21, 2023, 1:44am 4. ESP-IDF timer delay. 5nS, +/- interrupts/overhead/etc) or set up a timer to count exact clock cycles, and then convert to your preferred units at the user interface level. The actual time that the task remains blocked depends on the tick rate. e. 2. Delay a task until a specified time. Understanding the vTaskDelay help. Use a hardware timer, and interrupt. 0×10-6 Seconds: 1000 Microseconds = 0. If. Forces a task to leave the Blocked state, and enter the Ready state, even if the event the task was in the Blocked state to wait for has not occurred, and any specified timeout has not expired. I am trying to use FreeRTOS's vTaskDelay () function in order to periodically execute tasks. Here, the task is waiting for some other event to occur, such as the timer on the vTaskDelay() to expire. A comparison of the measurements of different ESP32 cards. Hi ladies and gentleman, Because of the outbreak I am stuck out of my home country and have to work online. In vTaskDelay you say how long after calling vTaskDelay you want to be woken . I need to do a sleep cycle, instead delay, to reduce power consumption, for example: EM2 (or deaper, but em2 is ok) Sleep 5 second. 68 ms. Multiply 0. the "1st delay done" message is not printed. For example, specifying a block period of 100 ticks will cause the task to unblock 100 ticks after vTaskDelay () is called. This page explains how we measure the real current consumption of the ESP32-S3-DevKitM-1 in deep sleep mode. Multiple Task SynronisationPosted by tabulous2011 on November 19, 2012What is the best way to achieve this ? Say i have 5 tasks, task 2,3,4,5 should not run until task 1 as completed. A beginners guide, Several things at the same time and the BlinkWithoutDelay example in the IDE. Thus, all ESP-IDF applications and many ESP-IDF components are written based on FreeRTOS. void vTaskDelayUntil ( TickType_t *pxPreviousWakeTime, const TickType_t xTimeIncrement ); INCLUDE_vTaskDelayUntil must be defined as 1 for this. THE TICK is a new Netflix show. It should work when the scheduler is running, just ensure to set the priority down before you call vTaskStartScheduler (). Hello, I am new to ESP32-C3 and try to find example using ESP-IDF to generate software interrupt in ESP32-C3 but I cant find anywhere. 1 seconds to run and the vtaskDelay is set to 2 seconds, that means that the next time this task will be scheduled after 2. As we want the delay of 1 microsecond, the timer frequency must be (1/ (1 us)), i. This sounds like an XY problem. A tick is what you configure it to be. Just tested. Currently, the largest value that will produce an accurate delay is 16383; larger values can produce an extremely short delay. where N is the required number of microseconds. I’ve been trying to use the function in a simple system containing a single task that calls this function in an infinite loop, and it causes permanent suspension of the scheduler via uxSchedulerSuspended in tasks. 2. But with a voltmeter we really see the voltage. e. My idea was to create a freeRTOS task for the stepper motor on core 0, so that core 1 can run WiFi ESP-NOW, but I have a hard time managing microseconds delay by doing so. Sometimes it delays for exactly 2 seconds but sometimes it misses 10ms. Reply. delay () is a blocking function. I set the FreeRTOS tick rate to 250 in 'make. VTaskDelay uses scheduler to make a delay. The FreeRTOS kernel is ported to all architectures (i. uint32 microseconds – Number of microseconds to delay: Delay by the specified number of microseconds. When you call vTaskDelay (), your current initSystems () task is put into the blocked state, allowing the operating system to schedule another task. See the RTOS Configuration documentation for more information. But vTaskDelayUntil () finishes immediately. As @atansoft says, vTaskDelay is approx in milliseconds. It could go from about 800 microseconds to max 1. task only for 1000 or 2000 micro seconds. My code uses both cores of the ESP32 and seems to work well. And for this reason, the prescaler value is 72. */ void delayMicroseconds (unsigned int us) { // calling avrlib's delay_us () function with low values (e. Thank you for the replies. - Tasks running on device but which do not use vTaskDelay: xTaskCreate(uart_task, "uTsk", 3500, NULL, 11, &UART_TaskHandle); -> no vTaskDelay used xTaskCreate(GSM_uartTask, "UauxTsk", 4096, NULL, 11, &GSM_TaskHandle); ->. Delay functions. Note that millis() doses not advance every millisecond. Code: Select all. The smallest delay you can pass to vTaskDelay () is 1 ms. So, guess I need to build a custom delay rather than using. print("Task1 running on core "); Serial. void vTaskDelay( const TickType_t xTicksToDelay );. First of all, set the clock source as internal clock. 1ms = SystemCoreClock / 1000. vTaskDelay() 并不会因此提供一种 控制周期性任务频率的好办法,因为途径代码的路径以及其他任务和中断活动将影响 vTaskDelay() 被调用的频率,进而会影响下一个任务执行的时间。 请参阅 vTaskDelayUntil(),了解为 便于任务以固定频率执行而设计的替代 API 函数。. Welcome to the forums @Ketaki04!This question is a good one and comes up time and time again. Since the output for vTaskDelay and vTaskDelayUntil is same, we should note the key differences between the two. Hi @Esp_dazz, I'm facing same assertion issue. 16 microseconds. Shizen February 21, 2023, 1:53am 5. A microsecond is a unit of time in the International System of Units (SI) equal to one millionth (0. So, does this vTaskDelay have same issue with OSIF_TimeDelay. The counter for millis() advances by two. delayMicroseconds() works in arduino. in the interrupt, you can yieldfromISR , taskgivefromISR etc this way you can get a. Tips, buy me a coffee, or three. If my kernel tick rate is set to 500 Hz does that mean that my 1 millisecond delay will be at minimum 2 milliseconds? If my kernel tick rate is set to 500 Hz does that mean that my 1 millisecond delay will be at minimum 2 milliseconds? August 15, 2022. I have disabled all interrupts. The delay will be variable depending on the temperature read from the printer head, and it vary around 1 millisecond. Reply. vTaskDelay () Doubt. 1 1 1. As you can see I measure the time between two instants using esp_timer_get_time() (this funcion returns an uint64_t with the number of microseconds starting from the power up). delay_using_macro: 00000000 <delay_using_macro. //delay_us (us); // for the. We would like to show you a description here but the site won’t allow us. First of all, set the clock source as internal clock. Alternatively, you can create another task that ticks at 1 Hz to increment a counter and use that as system time. h . Microsecond delay within taskPosted by pugglewuggle on December 24, 2014Is there any method of doing this with FreeRTOS 8. 1us = SystemCoreClock / 1000000. FreeRTOS Support Archive. write() slower than memcpy()? 2. 3. As you can see from the logs, the time keeps deviating. As I have observed that vTaskDelay is working on Tick Rate which gives milliseconds delay for application development but I want to prove some microseconds delay in my application. 执行过程是:程序. in most typical application. This is bad practice and can cause your ESP32 to enter Kernel panic and force restart. h" header file which is not a part of standard C library. The code below use channel 0. Re: vTaskDelayUntil hangs. However, during enumeration some USB hosts require a (small) response every 100uS. 3 posts • Page 1 of 1. Note that this is busy-waiting, so unlike vTaskDelay it does not allow other tasks to run (it just burns CPU cycles. no unsupported blocking function is called e. vTaskDelay for 1uS, possible?Posted by willywortel on December 3, 2008First of all, thanks everyone for the response so far. e 1 MHz. My Tick Rate is 1024 Hz. The delay will be 195 ticks or 199. Shizen: I can use vTaskDelay () for days on a task and the ESP32 will handle the timing. Using delayMicroseconds in RTOS cause crashed. vTaskDelay () is better for long or imprecise delays, because it lets another task wake up and run while the first task is suspended. Re: vTaskDelay. 1 post • Page 1 of 1. For example, the serial output when its priority is set to 0 is:. Yup^^. The value was 100. I use the vDelayTask to let an LED blink with 1Hz in order to give feedback to the user that the code is running. Once the program is launched, you can observe the tasks running in an orderly fashion. I am starting to presume that the stack size must also include variables declared in the task. Timestamp of the nearest timer event, in microseconds. Posted by richardbarry on July 2, 2013. You should use it if you are using arduino, and also you should post in the arduino forum. If you call vTaskDelay () then the task will enter the Blocked state (stop being available as a task that can be actually executing) for whatever period you specify, then automatically leave the Blocked state after that period. Thank you so much, okay i understood something. print("Task1 running on core. There are other tasks running in the background but they have priority 2 or higher. Returns. Delay () Delay is an arduino function wrapper that calls vtaskdelay. I want the overall time to be 100 micro-seconds. . This could change in future Arduino releases. system (system) December 24, 2014, 2:29pmAt a few microseconds, the overhead of switching tasks is just not worth it, and the added delay of switching you back in means the delay is longer than requested or you need to adjust the delay time. This is a port from esp-open-rtos for espressif official SDK ESP8266_RTOS_SDK. 125); does exactly what it says. Whereas vTaskDelay specifies a wake time relative to the time at which the function is called, vTaskDelayUntil specifies the absolute (exact) time at which it wishes to unblock. Up to 80 microseconds it is all good and stable, but if I raise the PWM frequency, below 80 µs the readings start to get unstable and unusable, the value starts jumping around and doesn't show a "real" value. ) to perform the delay. text. How can I do that with freertos or just what are the calculations (for delay). . ESP_Angus wrote:The RTOS tick period is (by default) 1ms, so vTaskDelay() will round this down to 0 ticks, and you'll either get no delay or a full time slice (1ms) delay while another task runs. The code simply reads an input on the serial port and returns it with. That's why the limitation on minimal period is there. Notice that it is especially unstable around 5V @ 25C, i. The sdk for the chip needed 2msec. Post by zazas321 » Wed Mar 16, 2022 6:51 am . But I can't find the way how to delay microsecond in esp-idf. These are different concepts. Yes, the. I am trying to measure the duty cycle interval (from falling to rising edge) in microseconds of an incoming PWM signal of 20 KHz. N. 2 Core Digital Pin Write Takes About 0. Turned out that vTaskDelay (2/portTICK_PERIOD_MS) wasn't waiting long. Is there any limitation about max millis() counter? If millis() is used properly then no. This is the second part of a series of ESP-IDF tutorials that I will complete as I learn stuff. Why is Serial. Thanks for your generous help. Why do I need the vTaskDelay() in the TaskTransmit(). task. But for USB work (and I’m just getting to the "oh, I see" stage with that) you really have to use interrupts. Returns. Using FreeRTOS timers does not work well if your timed action has to run many functions and objects because of the timer queue. ("MICROSECONDS","time in miliseconds=%lli",task_execution_start); // HERE BUNCH OF THINHS HAPPENING SUCH AS TOGGLING RELAYS, PRINTING VARIOUS STATES. 1 Seconds = 1000000 Microseconds: 10 Seconds = 10000000 Microseconds: 2500 Seconds = 2500000000 Microseconds: 2 Seconds = 2000000 Microseconds: 20 Seconds = 20000000 Microseconds: 5000 Seconds = 5000000000 Microseconds: 3 Seconds = 3000000 Microseconds: 30 Seconds = 30000000 Microseconds: 10000 Seconds =. vTaskDelay(500 / portTICK_RATE_MS); You can use vTaskDelay () even if not using FreeRTOS tasks. 5ms and it can process one request per interval at most. 3 posts • Page 1 of 1. The delay will be variable depending on the temperature read from the printer head, and it vary around 1 millisecond. vTaskDelay (250) causes a “Hard Fault&…. Hi, I have to drive a stepper motor with my esp32, with a frequency that requires a delay below milliseconds (for example 100 microseconds). Understanding the vTaskDelay help. Also note it is better to specify times in milliseconds, rather than ticks, so you can change the tick frequency without effecting the timing (other than the resolution of the time). One microsecond contains 1000 nanoseconds. I also report here the tasks I create on my project (with their priority, stack size and if vTaskDelay is used). I would like to toggle an output pin in the order of microseconds so use the function delayMicroseconds. There are a thousand microseconds in a millisecond and a million microseconds in a second. The assertion failure you see is vTaskDelay() checking if it was called whilst the scheduler is disabled. What I saw is the before I complete the initialization of this toolkit the vTaskDelay function works. vTaskDelay for 1uS, possible?Posted by willywortel on December 3, 2008First of all, thanks everyone for the response so far. Sorry for my poor description. The FreeRTOS kernel is now an MIT licensed AWS open source project. ("MICROSECONDS","time in miliseconds=%lli",task_execution_start); // HERE BUNCH OF THINHS HAPPENING SUCH AS TOGGLING RELAYS, PRINTING. In the main. Hardware: Board: Lolin32 Core Installation version: d5fdd71 IDE name: IDF component Flash Frequency: 40Mhz PSRAM enabled: no Upload Speed: 115200 Computer OS: Windows 8.