Skip to content
Snippets Groups Projects
Commit e07e9782 authored by Dorababu A's avatar Dorababu A
Browse files

Metrics : Read current CPU frequency

parent 99193443
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
#include "esp_flash_encrypt.h"
#include "esp_freertos_hooks.h"
#include "esp_mac.h"
#include "esp_private/esp_clk.h"
#include "esp_wifi.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
......@@ -63,6 +64,9 @@ static void shepherd_task(void *args) {
// get memory usage
printf("Memory usage : %d bytes \n",
(2048 - uxTaskGetStackHighWaterMark(NULL)));
// Get cpu clock frequency
// convert return value into MHz
printf("Current CPU frequency : %d MHz\n", (esp_clk_cpu_freq() / 1000000));
}
vTaskDelete(NULL);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment