Shop Learn
Wiznet W6100 [was High(er) performing ethernet (W5300 or other)] — Parallax Forums

Wiznet W6100 [was High(er) performing ethernet (W5300 or other)]

ke4pjwke4pjw Posts: 523
edited 2021-12-23 08:01 in Propeller 2

Hey guys, I am going into my winter phase of electronics projects. I want to do an E1.31 (DMX over ethernet) to WS2811 controller board. For my application, it will require high performance for a microcontroller. (> 10Mbps input) I am looking at developing around the P2 and the Wiznet 5300. All parallel I/O and parallel addressing seems to be the way to get serious throughput. Shouldn't be a problem with the number of available pins on the P2.

Just looking for other's opinions of, if I should look at other ethernet (must be wired) options. I know the Wiznet W5300 is a bit long in the tooth, but I don't know of any plans for it to be replaced. What else should I look at as an alternative?

As always, thanks in advance!
Terry

«1

Comments

  • jmgjmg Posts: 14,882

    @ke4pjw said:
    .... I know the Wiznet W5300 is a bit long in the tooth, but I don't know of any plans for it to be replaced. What else should I look at as an alternative?

    Maybe W5500 or W6100 ? >= 70MHz SPI ?

    https://docs.wiznet.io/Product/iEthernet/iethernet

  • ke4pjwke4pjw Posts: 523
    edited 2021-12-09 06:38

    @jmg said:
    Maybe W5500 or W6100 ? >= 70MHz SPI ?

    https://docs.wiznet.io/Product/iEthernet/iethernet

    So I took a look at the W6100 again. Yeah, I think this is the way.

    • Has 100base connectivity
    • Has pin for pin compatibility with the W5100
    • That parallel mode continuous read access looks like a dream

    Though not as fast as the W5300, which is an odd duck, I think the documentation for the W6100 "reads" better.

  • There was a thread a while ago where someone was working on an MII driver for P2. That would be wire-speed raw ethernet frames, and it seems part of LwIP could be ported over to support it well. P2 should be plenty fast for that to work reasonably.

  • The W6100 looks interesting and it also supports IPv6 if you are into that.

    If I read it correctly it would take a minimum of 7 SYSCLKs (@100MHz) to transfer each byte in or out of the W6100 in parallel data mode. This would allow close to wire-speed (100Mbps) data transfers without other overheads factored in if their IP socket engines can work that fast. This should exceed the W5500 performance in its SPI mode which they claim can get to 80Mbps but they only guarantee 33Mbps on the W5500 due to signal distortion etc (which is somewhat strange as I'd imagine it is board not chip dependent).

    A double wide P2-EVAL breakout would nicely match the maximum of 16 control+data pins needed by this chip. For best performance you would just have the P2 hardware drive out the control signals while the streamer was transferring the data. I know the read and write strobes are readily achievable with smartpins in PWM/counter modes. The two address pins also need to be generated somehow, probably with pulse or transition mode smartpins.

  • ke4pjwke4pjw Posts: 523
    edited 2021-12-17 03:09

    I have a nice and inexpensive W6100 breakout board (ordered directly from wiznet). Going to start wiring it up tonight. If I can reliably consume 25Mbps of UDP data, I will be happy.


  • So I had a few minutes last night to lay down a little SPIN2 code to just see if I can get a pulse out of the 6100. It is not turning out so well.

    I should be able to read the CIRD register (0x0000) and have 0x61 returned. This is the Chip ID and is a common register.

    I thought this would be a good test just to throw some quick and dirty spin2 at it. Apparently, I am doing something wrong. I have spent hours poring over the documentation to see what I might have missed. I don't see it. When I run the code, I get 0x00 returned. I am running in parallel bus mode.

    Anyone else want to throw a pair of eyes at this?

    PUB helloworld() | i, j
    ' initialize the display to desired resolution (eg, VGA, WVGA etc)
        vid.initDvi(-1, DVI_BASE_PIN, 0, vid.FLASH_TEXT, vid.WVGA)
    
    ' we can choose to map SEND to output to the text region
        send:=@vid.tx
    
      vid.setTextColours(2,16)
      send("Setting Mode: 010")
      PINH (W6100.MOD)
      vid.nl()
      send("Resetting Enternet: ")
      PINL (W6100.RSET)
      PINH (W6100.WRn)
      PINH (W6100.RDn)
      PINH (W6100.CSn)
      PINL (W6100.CLK)
      waitms (1000)
      PINH (W6100.RSET)
      waitms (1000)
    
      send("Reset complete")
      vid.nl()
    
      send("Chip Identification: ")
    ' Set ADDRH
      PINL(W6100.CSn)
      waitms (50)
      PINWRITE (W6100.ADDR ADDPINS 1, %00)
      PINWRITE (W6100.DATA ADDPINS 7, $00)
      PINL(W6100.WRn)
      waitms (50)
      PINH(W6100.WRn)
      waitms (50)
    
    'Set ADDRL
      PINWRITE (W6100.ADDR ADDPINS 1, %01)
      PINWRITE (W6100.DATA ADDPINS 7, $00)
      PINL(W6100.WRn)
      waitms (50)
      PINH(W6100.WRn)
      waitms (50)
    
    'Set BS (This is a common register, therefore set byte data to $00)
      PINWRITE (W6100.ADDR ADDPINS 1, %10)
      PINWRITE (W6100.DATA ADDPINS 7, $00)
      PINL(W6100.WRn)
      waitms (50)
      PINH(W6100.WRn)
      waitms (50)
    
    'Read Register
      PINWRITE (W6100.ADDR ADDPINS 1, %11)
      PINL(W6100.RDn)
      waitms (50)
      version := PINREAD (W6100.DATA ADDPINS 7)
      PINH(W6100.RDn)
      waitms (50)
      vid.hex(version,2)
    
      PINH(W6100.CSn)
    
    

  • You're not setting the DIR to input on the data pins before trying to read. It should be done prior to read going low so that it's not a fight.

    There may be other issues like chip select not going high between commands, but I'm not familiar with the interface.

  • @whicker said:
    You're not setting the DIR to input on the data pins before trying to read. It should be done prior to read going low so that it's not a fight.

    There may be other issues like chip select not going high between commands, but I'm not familiar with the interface.

    WooYah! I had to set PINF(W6100.DATA ADDPINS 7). If I drove those pins manually with 3.3, I could read them correctly, so I was very confused. The W6100 didn't have enough drive to "force" them high. There are no examples of PINREAD in the manual, so I assumed it would change to INA as a part of the command.

    Now time to get down to the business of writing a driver!

    Thank you Whicker! Sometimes I just need someone to point out the obvious.

  • It has a pulse! Now to write a DHCP client.


  • DHCP discovery is being sent! To quote Jon Bon Jovi, "Woah, we're half way there!"

  • DHCP is working! There is much code cleanup required, it needs logic to ensure messages are valid, and it needs some logic around MAC generation, renewing expired offers, and generating valid transaction IDs. However, all of the parts to get it on the network are there!

    I really love this little W6100 chip and breakout board. Wish there was a board that fit the P2 Edge or Evaluation board, hint, hint.

    Video below:

    https://youtube.com/watch?v=aRs3EBuHh3Y

  • Great news

  • Wow! Please keep posting your journey so I know where I can keep stealing! Lol!

  • @JRoark said:
    Wow! Please keep posting your journey so I know where I can keep stealing! Lol!

    I hope to have code posted in a few of days. Maybe a VERY simple webserver. Not sure if I am going to do the webserver or the E1.31 packet parser first.

  • @ke4pjw said:
    DHCP is working!

    Nice work @ke4pjw. Great to see the P2 being pinged from a PC. I've got the W5500 on my own board but it should be somewhat similar.

  • I found some obvious bugs and got those fixed. Major bug was not performing a complete DHCP handshake. Now a discovery packet is sent, an offer is received, a request is sent, and finally an ACK is received. A unique request ID is sent and only responses with that same request id are considered. Also, I found a minor bug that was preventing the RX buffer to increment, that has been corrected. I have tested with multiple DHCP servers and it appears to work with the two I have tried. A Linksys router and Windows Internet Connection Sharing.

    https://youtu.be/MbJW8zrEGZQ

    I purchased an extra SD card this evening and will try to get a simple web server running. At that point I will perform more code cleanup and release what I have. It is rough, so please be kind.

  • This could really be a game-changer for several of us!

  • I won't call it a web server, but it is answering web requests on port 80.


  • Nice work Terry!

  • I am now in the code cleanup stage. Getting my spaghetti code out of the pot and into some bowls :smiley:

    I have found some interesting behavior surrounding how web browsers will attempt to perform persistent connections. This leads to a problem where a socket can get tied up to a single browser. I recall something like this on the Spinneret Web Server. Now that I am down in the details, I know where that can be fixed. Just bat that connection down, if it is idle for more than a few seconds.

    I hope to have an inital code release next weekend.

    I want to let everyone on know, if you want to develop for the W6100, this is the board you need. https://eshop.wiznet.io/shop/module/network-module/wiz610mj/

    The other board is some Arduino or ARM stuff that does not allow use of the parallel interface.

  • ke4pjwke4pjw Posts: 523
    edited 2022-01-04 08:03

    So, we have a P2 on the Interwebs. http://71.203.214.57:6809/

    I need some feedback on the "hack" I did to knock down those persistent connections from Chrome and Edge. It may cause problems on latent networks. Please, click the link and let me know if you can access the page and how quickly the very basic page loads or if you can't pull it up.

    I am not sure how often my IP changes, so if it does soon, I apologize in advance.

    Also, this is not a full-fledged webserver or anything. It is a complete hack, just to test with.

    I hope I am not placing this out there too soon, but it has been operating solid so far. I guess we will see how it does.

  • Really fast response! Iphone love it. Good stuff

  • Hi

    Yep- came up super quick in uk

    Dave

  • PublisonPublison Posts: 12,267

    Nice work Terry. Instant response from Chrome and Bing.

  • RS_JimRS_Jim Posts: 1,570

    Today, I got a could not connect to server error in Safari on my iPad. Is it still on line?
    Jim

  • PublisonPublison Posts: 12,267

    Still looks good on my end.

  • It was up, but now iphone says it is offline here too.

  • yes probably the IP address changed.
    it worked fine here on my end, too, on an android phone.
    As far as i know, you can, after you sent the HTTP response, just close the connection. in the old days you could just telnet to any http server (not many around anymore due to httpS) and request a page. after answering the host would shut down the connection, as was common practise. keep alive to do multiple requests on one socket and ,,push" messages came after that

Sign In or Register to comment.