Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/CAN.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*
*/

#include "esp_system.h"
#include "CAN.h"

#include "freertos/FreeRTOS.h"
Expand Down Expand Up @@ -228,6 +229,14 @@ int CAN_init() {
// enable all interrupts
MODULE_CAN->IER.U = 0xff;

esp_chip_info_t chip_info;
esp_chip_info(&chip_info);
if(chip_info.revision >=2){
// disable wake-up interrupt
// refer to https://github.com/sandeepmistry/arduino-CAN/issues/75 for the original information
MODULE_CAN->IER.B.WUIE = 0x0;
}

// Set acceptance filter
MODULE_CAN->MOD.B.AFM = __filter.FM;
MODULE_CAN->MBX_CTRL.ACC.CODE[0] = __filter.ACR0;
Expand Down