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
};