From 3aaa2adfe54a0bfbfe0b4ef4e24a37d6e3b8105e Mon Sep 17 00:00:00 2001 From: Tinyu Date: Tue, 19 Aug 2025 08:11:37 +0000 Subject: [PATCH] fix(driver_twai): modify the calculation description of quanta_resolution_hz Closes https://github.com/espressif/esp-idf/issues/16996 Closes https://github.com/espressif/esp-idf/pull/17002 --- components/hal/include/hal/twai_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/hal/include/hal/twai_types.h b/components/hal/include/hal/twai_types.h index a7d3dc046d..c4a399964d 100644 --- a/components/hal/include/hal/twai_types.h +++ b/components/hal/include/hal/twai_types.h @@ -69,7 +69,7 @@ typedef int twai_clock_source_t; typedef struct { twai_clock_source_t clk_src; /**< Optional, clock source, remain 0 to using TWAI_CLK_SRC_DEFAULT by default */ uint32_t quanta_resolution_hz; /**< The resolution of one timing quanta, in Hz. If setting, brp will be ignored */ - uint32_t brp; /**< Bit rate pre-divider, clock_source_freq / brp = quanta_resolution_hz */ + uint32_t brp; /**< Bit rate pre-divider, f(clk_src) / brp = quanta_resolution_hz, f(clk_src) can be obtained using esp_clk_tree_src_get_freq_hz(clk_src,,)*/ uint8_t prop_seg; /**< Prop_seg length, in quanta time */ uint8_t tseg_1; /**< Seg_1 length, in quanta time */ uint8_t tseg_2; /**< Seg_2 length, in quanta time */