TWAI stopped working after upgrade to New Arduino Core
Posted: Sat Feb 15, 2025 7:04 pm
Hello.
I have used Twai configuration, which worked well:
After update of ESP32 Arduino to latest core version it stopped working.
Twai twai_timing_config_t timing_config changed and now it should be
What should be the first 2 values for default, that it would work as before? Thank you for any help.
I have used Twai configuration, which worked well:
Code: Select all
twai_timing_config_t timing_config = {
.brp = 83, // Baud Rate Prescaler
.tseg_1 = 6, // Time Segment 1 (BS1)
.tseg_2 = 2, // Time Segment 2 (BS2)
.sjw = 1, // Synchronization Jump Width
.triple_sampling = false // Disable triple sampling
};
After update of ESP32 Arduino to latest core version it stopped working.
Twai twai_timing_config_t timing_config changed and now it should be
Code: Select all
twai_timing_config_t timing_config = {
.clk_src = TWAI_CLK_SRC_DEFAULT, // Clock Source
.quanta_resolution_hz = 10000000, // Quanta Resolution (10 MHz)
.brp = 83, // Baud Rate Prescaler
.tseg_1 = 6, // Time Segment 1 (BS1)
.tseg_2 = 2, // Time Segment 2 (BS2)
.sjw = 1, // Synchronization Jump Width
.triple_sampling = false // Disable triple sampling
};