fix speed halved in ESP32-WROOM-32E

ESP32 ECO3 added a configurable bit that will cause CAN bus speeds to be halved in new V3 core 32E module.
This bit is in `TWAI_INT_ENA_REG`, bit4 which was previously reserved.
Change respects reserved bit and should not cause issues for previous versions since this bit should not have been written to.
This commit is contained in:
Sam Perry 2022-02-20 16:57:10 -05:00 committed by GitHub
parent f95cadabb2
commit c2d6b13103
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -226,7 +226,7 @@ int CAN_init() {
MODULE_CAN->BTR1.B.SAM = 0x1; MODULE_CAN->BTR1.B.SAM = 0x1;
// enable all interrupts // enable all interrupts
MODULE_CAN->IER.U = 0xff; MODULE_CAN->IER.U = 0xef;
// Set acceptance filter // Set acceptance filter
MODULE_CAN->MOD.B.AFM = __filter.FM; MODULE_CAN->MOD.B.AFM = __filter.FM;
@ -296,4 +296,4 @@ int CAN_config_filter(const CAN_filter_t* p_filter) {
__filter.AMR3 = p_filter->AMR3; __filter.AMR3 = p_filter->AMR3;
return 0; return 0;
} }