ESP32: What is the frequency of TWAI_CLK_SRC_DEFAULT?
The frequency of TWAI_CLK_SRC_DEFAULT on the ESP32 is, by default 80 MHz. This is independent of the core frequency (e.g. 160 MHz or 240MHz).
You can verify this by using the esp_clk_tree_src_get_freq_hz function in your code, as shown in the example below:
twai_clock_example.c
#include "esp_clk_tree.h"
void app_main(void)
{
uint32_t clockSourceHz;
esp_clk_tree_src_get_freq_hz(TWAI_CLK_SRC_DEFAULT, ESP_CLK_TREE_SRC_FREQ_PRECISION_CACHED, &clockSourceHz);
printf("TWAI clock source frequency: %ld Hz\n", clockSourceHz);
}Check out similar posts by category:
ESP32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow