mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
TWAI: Fix BRP field initialization onf ESP32 ECO3
This commit zero initializes the brp_div field on ESP32 ECO3 to prevent incorrect timing configuration.
This commit is contained in:
@ -368,6 +368,8 @@ static inline void twai_ll_set_bus_timing(twai_dev_t *hw, uint32_t brp, uint32_t
|
|||||||
//Need to set brp_div bit
|
//Need to set brp_div bit
|
||||||
hw->interrupt_enable_reg.brp_div = 1;
|
hw->interrupt_enable_reg.brp_div = 1;
|
||||||
brp /= 2;
|
brp /= 2;
|
||||||
|
} else {
|
||||||
|
hw->interrupt_enable_reg.brp_div = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
hw->bus_timing_0_reg.brp = (brp / 2) - 1;
|
hw->bus_timing_0_reg.brp = (brp / 2) - 1;
|
||||||
|
Reference in New Issue
Block a user