From 7b5ee58ba50ae28341111e4641d35076080b8597 Mon Sep 17 00:00:00 2001 From: PaulStoffregen Date: Thu, 26 Jul 2018 02:37:48 -0700 Subject: [PATCH] Arduino Zero can't use W5100-based shields with SCK > 8 MHz --- src/utility/w5100.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/utility/w5100.h b/src/utility/w5100.h index 4dd09d2..e6e01e1 100644 --- a/src/utility/w5100.h +++ b/src/utility/w5100.h @@ -40,6 +40,15 @@ #define SPI_ETHERNET_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE0) #endif +// Arduino Zero can't use W5100-based shields faster than 8 MHz +// https://github.com/arduino-libraries/Ethernet/issues/37#issuecomment-408036848 +// W5500 does seem to work at 12 MHz. Delete this if only using W5500 +#if defined(__SAMD21G18A__) +#undef SPI_ETHERNET_SETTINGS +#define SPI_ETHERNET_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE0) +#endif + + typedef uint8_t SOCKET; class SnMR {