ESP32: Welche Frequenz hat TWAI_CLK_SRC_DEFAULT?
Die Frequenz von TWAI_CLK_SRC_DEFAULT auf dem ESP32 ist standardmäßig 80 MHz. Dies ist unabhängig von der Kernfrequenz (z.B. 160 MHz oder 240MHz).
Sie können dies überprüfen, indem Sie die Funktion esp_clk_tree_src_get_freq_hz in Ihrem Code verwenden, wie im folgenden Beispiel gezeigt:
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