Search found 4 matches
- Mon Mar 04, 2024 4:27 pm
- Forum: ESP-IDF
- Topic: esp_timer_get_time() and vTaskDelay() behaviour
- Replies: 9
- Views: 4349
Re: esp_timer_get_time() and vTaskDelay() behaviour
#include "esp_timer.h" void measure_important_function(void) { const unsigned MEASUREMENTS = 5000; uint64_t start = esp_timer_get_time(); uint64_t retries = 0; while(retries < MEASUREMENTS) { important_function(); retires++; } uint64_t end = esp_timer_get_time(); printf("%u iterations took %llu mil...
- Sun Mar 03, 2024 9:45 pm
- Forum: ESP-IDF
- Topic: esp_timer_get_time() and vTaskDelay() behaviour
- Replies: 9
- Views: 4349
Re: esp_timer_get_time() and vTaskDelay() behaviour
Yes, I set de clock to 1000 [Hz] If you do a vTaskDelay(pdMS_TO_TICKS(2)) you tell FreeRTOS to wait for the tick timer to increase two times. However, because you're already 'halfway' the first tick. Why it's already halfway the first tick? Calling vTaskDelay takes ~ 0.5 [ms]? I'm just recently deal...
- Thu Feb 29, 2024 1:38 am
- Forum: ESP-IDF
- Topic: ESP32-C6 builtin USB-JTAG - unable to start debug session
- Replies: 1
- Views: 1661
Re: ESP32-C6 builtin USB-JTAG - unable to start debug session
This help me with my custome ESP32-C3 for flashing/debugging directly with my PC (maybe it can help in this case when using a debugger adapter):
https://esp32.com/viewtopic.php?t=21110
https://esp32.com/viewtopic.php?t=21110
- Wed Feb 28, 2024 9:19 pm
- Forum: ESP-IDF
- Topic: esp_timer_get_time() and vTaskDelay() behaviour
- Replies: 9
- Views: 4349
esp_timer_get_time() and vTaskDelay() behaviour
Hi, I was trying the example provided by ESPESSIF in this page: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/performance/speed.html I wanted to test it in my code while making the following change: #include "esp_timer.h" void measure_important_function(void) { const unsigne...