Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Ethernet W5500 with Teensy 4.1

  1. #1

    Ethernet W5500 with Teensy 4.1

    Hi!
    I have working project with Teensy 3.5 and Ethernet shield WIZ850io. I use standart SPI port for connection. Now i try to use Teensy 4.1, but unfortunetly i cant starting Ethernet.
    How i can see in pinout diagram Teensy 4.1 has the same SPI pins as Teensy 3.5.
    Examples from Standart libraries dont work properly, teensy hang up while Ethernet.begin(mac, ip);
    I tryed all libraries (Ethernet, NativeEthernet, QNEthernet) with same result.
    I read this https://www.pjrc.com/store/wiz820_sd_adaptor.html#init and make reset, how it recomended, but still dont work.
    Is it possible to use Ethernet shield WIZ850io with Teensy 4.1?

  2. #2
    I forgot to write, that i dont have any pullup resistors, just direct connection between Tennsy and Ethernet shield using pins 10,11,12,13

  3. #3
    Senior Member
    Join Date
    Jan 2020
    Location
    Toronto, Canada
    Posts
    117
    Try to use my Ethernet_Generic or EthernetWebServer library

    I'm using here OK, without any pull-up resistor, for either Teensy4.0 or Teensy4.1


    Code:
    Starting AdvancedWebServer on TEENSY 4.1 with W5x00 using Ethernet_Generic Library on SPI0/SPI
    EthernetWebServer v2.1.3
    [EWS] =========== USE_ETHERNET_GENERIC ===========
    [EWS] Default SPI pinout:
    [EWS] MOSI: 11
    [EWS] MISO: 12
    [EWS] SCK: 13
    [EWS] SS: 10
    [EWS] =========================
    [EWS] Board : TEENSY 4.1 , setCsPin: 10
    [ETG] W5100 init, using SS_PIN_DEFAULT = 10 , new ss_pin =  10 , W5100Class::ss_pin =  10
    [ETG] Chip is W5500
    [ETG] W5100::init: W5500, SSIZE = 8192
    [EWS] =========================
    [EWS] Currently Used SPI pinout:
    [EWS] MOSI: 11
    [EWS] MISO: 12
    [EWS] SCK: 13
    [EWS] SS: 10
    [EWS] =========================
    Using mac index = 2
    Connected! IP address: 192.168.2.87
    HTTP EthernetWebServer is @ IP : 192.168.2.87
    ..[EWS] String Len = 0, extend to 2048
    ...
    
    Click image for larger version. 
    
    Name:	Selection_168.png 
    Views:	0 
    Size:	38.3 KB 
    ID:	28283

  4. #4
    @khoil-prog, thanks for the answer.
    But not work for me.
    Code:
    Starting WebServer on TEENSY 4.1 with W5x00 using Ethernet_Generic Library with Large Buffer
    Ethernet_Generic v2.3.0
    [ETG] Default SPI pinout:
    [ETG] MOSI: 11
    [ETG] MISO: 12
    [ETG] SCK: 13
    [ETG] SS: 10
    [ETG] =========================
    [ETG] Board : TEENSY 4.1 , setCsPin: 10
    [ETG] W5100 init, using SS_PIN_DEFAULT = 10 , new ss_pin =  10 , W5100Class::ss_pin =  10
    [ETG] W5100::init: no chip :-(
    [ETG] Currently Used SPI pinout:
    [ETG] MOSI: 11
    [ETG] MISO: 12
    [ETG] SCK: 13
    [ETG] SS: 10
    [ETG] =========================
    Using mac index = 0
    Connected! IP address: 0.0.0.0
    Speed: NO LINK, Duplex: NO LINK, Link status: NO LINK
    W5100::init: no chip :-(

  5. #5
    This is same connection with Teensy 3.5
    Code:
    Starting WebServer on Teensy 3.5 with W5x00 using Ethernet_Generic Library with Large Buffer
    Ethernet_Generic v2.3.0
    [ETG] Default SPI pinout:
    [ETG] MOSI: 11
    [ETG] MISO: 12
    [ETG] SCK: 13
    [ETG] SS: 10
    [ETG] =========================
    [ETG] Board : Teensy 3.5 , setCsPin: 10
    [ETG] W5100 init, using SS_PIN_DEFAULT = 10 , new ss_pin =  10 , W5100Class::ss_pin =  10
    [ETG] Chip is W5500
    [ETG] W5100::init: W5500, SSIZE = 8192
    [ETG] Currently Used SPI pinout:
    [ETG] MOSI: 11
    [ETG] MISO: 12
    [ETG] SCK: 13
    [ETG] SS: 10
    [ETG] =========================
    Using mac index = 5
    Connected! IP address: 192.168.0.129
    Speed: 100 MB, Duplex: FULL DUPLEX, Link status: LINK

  6. #6
    This is full Log
    Code:
    Starting WebServer on TEENSY 4.1 with W5x00 using Ethernet_Generic Library with Large Buffer
    Ethernet_Generic v2.3.0
    [ETG] Default SPI pinout:
    [ETG] MOSI: 11
    [ETG] MISO: 12
    [ETG] SCK: 13
    [ETG] SS: 10
    [ETG] =========================
    [ETG] Board : TEENSY 4.1 , setCsPin: 10
    [ETG] begin: _pinCS =  0
    [ETG] W5100 init, using SS_PIN_DEFAULT = 10 , new ss_pin =  10 , W5100Class::ss_pin =  10
    [ETG] W5x00::softReset
    [ETG] W5x00::softReset, mr = 0
    [ETG] isW5200: detect W5200 chip
    [ETG] W5x00::softReset
    [ETG] W5x00::softReset, mr = 0
    [ETG] isW5500: detect W5500 chip
    [ETG] W5x00::softReset
    [ETG] W5x00::softReset, mr = 0
    [ETG] isW5100: detect W5100 chip
    [ETG] W5x00::softReset
    [ETG] W5x00::softReset, mr = 0
    [ETG] isW5100S: detect W5100S chip
    [ETG] W5x00::softReset
    [ETG] W5x00::softReset, mr = 0
    [ETG] readMR (19) = 0
    [ETG] W5100::init: no chip :-(
    [ETG] Currently Used SPI pinout:
    [ETG] MOSI: 11
    [ETG] MISO: 12
    [ETG] SCK: 13
    [ETG] SS: 10
    [ETG] =========================
    Using mac index = 0
    Connected! IP address: 0.0.0.0
    Speed: NO LINK, Duplex: NO LINK, Link status: NO LINK

  7. #7
    I try to use more degug information for function isW5500()
    Code:
    uint8_t W5100Class::isW5500()
    {
      chip = w5500;
    
      ETG_LOGDEBUG("isW5500: detect W5500 chip");
    
      if (!softReset())
        return 0;
    
    ETG_LOGDEBUG("isW5500 1");
    
      writeMR(0x08);
      
      if (readMR() != 0x08)
        return 0;
    
    ETG_LOGDEBUG("isW5500 2");
    
      writeMR(0x10);
      
      if (readMR() != 0x10)
        return 0;
    
      writeMR(0x00);
      
      if (readMR() != 0x00)
        return 0;
    
      int ver = readVERSIONR_W5500();
    
      ETG_LOGDEBUG1("Version =", ver);
    
      if (ver != 4)
        return 0;
    
      ETG_LOGWARN("Chip is W5500");
    
      return 1;
    }
    So in monitor i can see [ETG] isW5500 1 and dont see [ETG] isW5500 2

  8. #8
    Oh my God, I found it!!! Two pins were not soldered properly((((((((
    It work fine!!!

  9. #9
    Quote Originally Posted by gonzales View Post
    Oh my God, I found it!!! Two pins were not soldered properly((((((((
    It work fine!!!
    Good to know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •