feat(driver_twai): c5 eco2 support clock source pll80m to output 8m twai

This commit is contained in:
wanckl
2025-04-11 20:07:24 +08:00
parent fb2f5cc1da
commit 6bfdc0ce63
5 changed files with 427 additions and 476 deletions

View File

@@ -92,7 +92,7 @@ static inline void twaifd_ll_reset_register(uint8_t twai_id)
*/
static inline void twaifd_ll_set_clock_source(uint8_t twai_id, twai_clock_source_t clk_src)
{
PCR.twai[twai_id].twai_func_clk_conf.twai_func_clk_sel = (clk_src == TWAI_CLK_SRC_RC_FAST) ? 1 : 0;
PCR.twai[twai_id].twai_func_clk_conf.twai_func_clk_sel = (clk_src == TWAI_CLK_SRC_XTAL) ? 0 : 1;
}
/**