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:
parent
f95cadabb2
commit
c2d6b13103
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue