Skip to content

Commit 7b5ee58

Browse files
Arduino Zero can't use W5100-based shields with SCK > 8 MHz
1 parent f60bb83 commit 7b5ee58

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/utility/w5100.h

+9
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@
4040
#define SPI_ETHERNET_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE0)
4141
#endif
4242

43+
// Arduino Zero can't use W5100-based shields faster than 8 MHz
44+
// https://github.com/arduino-libraries/Ethernet/issues/37#issuecomment-408036848
45+
// W5500 does seem to work at 12 MHz. Delete this if only using W5500
46+
#if defined(__SAMD21G18A__)
47+
#undef SPI_ETHERNET_SETTINGS
48+
#define SPI_ETHERNET_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE0)
49+
#endif
50+
51+
4352
typedef uint8_t SOCKET;
4453

4554
class SnMR {

0 commit comments

Comments
 (0)