diff --git a/extras/acan2515.pdf b/extras/acan2515.pdf index bc9e7a3..0479d09 100644 Binary files a/extras/acan2515.pdf and b/extras/acan2515.pdf differ diff --git a/library.properties b/library.properties index 2a8b2d6..7cdfde8 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ACAN2515 -version=2.1.1 +version=2.1.2 author=Pierre Molinaro maintainer=Pierre Molinaro sentence=Driver for MCP2515 CAN Controller diff --git a/src/ACAN2515.cpp b/src/ACAN2515.cpp index 7b714ca..f651e15 100644 --- a/src/ACAN2515.cpp +++ b/src/ACAN2515.cpp @@ -200,10 +200,19 @@ uint16_t ACAN2515::beginWithoutFilterCheck (const ACAN2515Settings & inSettings, mSPI.transfer (RESET_COMMAND) ; unselect () ; mSPI.endTransaction () ; - //--- - delayMicroseconds (10) ; + //--- DS20001801J, page 55: The Oscillator Start-up Timer keeps the device in a Reset + // state for 128 OSC1 clock cycles after the occurrence of a Power-on Reset, SPI Reset, + // after the assertion of the RESET pin, and after a wake-up from Sleep mode + // Fot a 1 MHz clock --> 128 µs + // So delayMicroseconds (10) is too short --> use delay (2) + // delayMicroseconds (10) ; // Removed in release 2.1.2 + delay (2) ; // Added in release 2.1.2 //--- Internal begin - errorCode = internalBeginOperation (inSettings, inRXM0, inRXM1, inAcceptanceFilters, inAcceptanceFilterCount) ; + errorCode = internalBeginOperation (inSettings, + inRXM0, + inRXM1, + inAcceptanceFilters, + inAcceptanceFilterCount) ; } //--- Configure interrupt only if no error (thanks to mvSarma) if (errorCode == 0) {