feat(driver_twai): support using all 4 hardware tx buffer

This commit is contained in:
wanckl
2026-06-24 14:15:51 +08:00
committed by Wan Lei
parent 15a1a86a0a
commit ec31ba1c6c
17 changed files with 241 additions and 58 deletions
@@ -194,12 +194,12 @@ TEST_CASE("twai fd transmit time (loopback)", "[twai]")
}
uint64_t predict_time_ms = (uint64_t)trans_num * arb_bits * 1000 / node_config.bit_timing.bitrate;
predict_time_ms += (uint64_t)trans_num * data_bits * 1000 / node_config.data_timing.bitrate;
predict_time_ms += (trans_num * 20) / 1000; // add about 20 us interrupt overhead per frame
predict_time_ms += (trans_num * 10) / 1000; // add about 10 us interrupt overhead per frame
#if CONFIG_COMPILER_OPTIMIZATION_NONE
predict_time_ms += (trans_num * 10) / 1000; // non optimized slow code
predict_time_ms += (trans_num * 5) / 1000; // non optimized slow code
#endif
#if CONFIG_PM_DFS_INIT_AUTO
predict_time_ms += (trans_num * 35) / 1000; // slow cpu
predict_time_ms += (trans_num * 10) / 1000; // slow cpu
#endif
//waiting pkg receive finish