Shop OBEX P1 Docs P2 Docs Learn Events
W5200 Driver — Parallax Forums

W5200 Driver

DynamoBenDynamoBen Posts: 366
edited 2012-10-13 17:28 in Accessories
A few months back I posted a W5200 driver which is an updated version of the existing W5100 driver. Tonight I posted v1.2 which is over twice as fast as the W5100 SPI driver (thanks to Jim St John for getting things sped up). Enjoy, and I would love your feedback if improvements can be made.

W5200 driver in OBEX

Comments

  • twctwc Posts: 107
    edited 2012-10-09 14:20
    Hello, thanks for the timely release. I have been using wiz820io with a PropGCC program, just now starting to try Mike Gs software. Having some troubles, I decided to try your driver & demo as a test and it got me further along with testing Mike's software too. But still some headscratchers. To get your demo working I had to disconnect the nRESET pin (pin 4). Otherwise it just seems to get '0's into the verified params and socket stays closed. I couldn't really find in the software where you give the wiz820io hard nRESET? I've been doing that in my PropGCC program all along, but seems it's not necessary. Think I see behavior changes power-on reset vs. just Prop reset? I've got more digging to do. Anyway, right now the Demo seems to work fine as long as pin 4 disconnected.
  • DynamoBenDynamoBen Posts: 366
    edited 2012-10-09 14:24
    I'll take at look at the reset issue. It is possible that I bypassed my reset like you did and never reattached it for testing.
  • twctwc Posts: 107
    edited 2012-10-09 15:10
    I can see there is a ResetHardware function in the driver, but doesn't ever seem to get called in the Demo?
  • DynamoBenDynamoBen Posts: 366
    edited 2012-10-09 15:17
    twc wrote: »
    I can see there is a ResetHardware function in the driver, but doesn't ever seem to get called in the Demo?

    That function is there in case you want to reset from the parent code, it isn't required for normal operation. However there is a reset in the ASM code, so when the cog is launched it resets the W5200.
  • twctwc Posts: 107
    edited 2012-10-09 16:42
    Hmm...just doesn't work with pin 4 connected to W5200 /nRESET. All the 'verifieds' come back 0, socket stays closed. I tried extending the Rst/unRst delays in the driver, didn't help. Now as an experiment I just switched nRESET to a different Prop pin (6) and perform nRESET myself in the parent code, and it works i.e. I can leave nRESET connected. Does your test platform have pin 4 connected to nRESET? (things seem to work even if nRESET is floating). Hope the feedback isn't a bother, thanks for your support.
  • twctwc Posts: 107
    edited 2012-10-09 17:11
    ...just FYI I moved nRESET back to pin 4 and issued ethernet.ResetHardware in parent code and that works i.e. I can leave pin 4 connected. One odd thing is it displays 'verified MAC' as 0.0.0.0, but then server works anyway. If I add ex: 100 ms delay after ResetHardware it displays 'verified MAC' correctly (and server works). Not sure what it all means, but adding ResetHardware seems to solve my issue.
  • DynamoBenDynamoBen Posts: 366
    edited 2012-10-09 17:14
    twc wrote: »
    ...just FYI I moved nRESET back to pin 4 and issued ethernet.ResetHardware in parent code and that works i.e. I can leave pin 4 connected. One odd thing is it displays 'verified MAC' as 0.0.0.0, but then server works anyway. If I add ex: 100 ms delay after ResetHardware it displays 'verified MAC' correctly (and server works). Not sure what it all means, but adding ResetHardware seems to solve my issue.

    From the datasheet:
    RESET should be held at least 2us after low assert, and wait for at least 150ms after high de-assert in order for PLL logic to be stable.

    I'm working on the fix now.
  • DynamoBenDynamoBen Posts: 366
    edited 2012-10-13 11:03
    nReset issue has been fixed, new version is in OBEX v1.3.
  • twctwc Posts: 107
    edited 2012-10-13 17:28
    ...tested the new version and it now works with nRESET connected, looks good!
Sign In or Register to comment.