Merge branch 'contrib/github_pr_17002' into 'master'

fix(driver_twai): modify the calculation description of quanta_resolution_hz (GitHub PR)

Closes IDFGH-16055 and IDFGH-16061

See merge request espressif/esp-idf!41405
This commit is contained in:
Wan Lei
2025-08-21 10:18:29 +08:00

View File

@@ -69,7 +69,7 @@ typedef int twai_clock_source_t;
typedef struct { typedef struct {
twai_clock_source_t clk_src; /**< Optional, clock source, remain 0 to using TWAI_CLK_SRC_DEFAULT by default */ 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 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 prop_seg; /**< Prop_seg length, in quanta time */
uint8_t tseg_1; /**< Seg_1 length, in quanta time */ uint8_t tseg_1; /**< Seg_1 length, in quanta time */
uint8_t tseg_2; /**< Seg_2 length, in quanta time */ uint8_t tseg_2; /**< Seg_2 length, in quanta time */