Shop Learn P1 Docs P2 Docs
Wiznet official driver working (FlexC) - Page 2 — Parallax Forums

Wiznet official driver working (FlexC)



  • RaymanRayman Posts: 12,926
    edited 2022-11-11 17:36

    @ke4pjw Thanks. Does sound better when you put it like that.

    Wireshark is pretty handy for getting actual download times.
    Turned the inline assembly for block SPI transfers back to C and download time increased to 0.67 seconds.
    So, inline assembly does help SPI a little...

    Added "volatile" to that inline assembly and time decreased to 0.350 seconds.
    ~ 7 Mbps.

    That was with 250 MHz P2 clock.

    Increased P2 clock to 300 MHz.
    Now at 0.317 seconds.
    7.8 Mbps. Guess that's good enough for now...

    A dedicated SPI cog could probably improve bulk transfer speed, but don't want to do that...

  • @rayman I don't use a dedicated cog to communicate with the W6100. I just use locks and it works fine, even when streaming multi-megabit UDP data to the light controller, the webserver is peppy.

  • RaymanRayman Posts: 12,926

    Figured out how to use the fetch API to send commands & receive data from Propeller2.
    Maybe it's a hack, but the button uses fetch to get the file "P56.txt".
    Added some C code to check if that filename is requested and if so to toggle P56.

    848 x 569 - 39K
  • RaymanRayman Posts: 12,926
    edited 2022-11-12 23:09

    Here's some fun...
    Created this interactive web page that displays all P2 pin status and toggles the pin (_drvnot) when clicked.

    1299 x 969 - 102K
  • Wuerfel_21Wuerfel_21 Posts: 3,310
    edited 2022-11-13 00:13

    You can do background-image: linear-gradient(90deg, #9FCFFF, white 90px); to replace background-image: url(blegtext.gif); background-repeat: repeat-y; and get rid of the image file. (well, it's slightly smoother and the ramp is different, but who cares?)

  • RaymanRayman Posts: 12,926

    @Wuerfel_21 That does work, thanks. But, having the file there is good for testing...

    Looking at adding in ftp. Example looks like it needs 3 sockets, but I only have two left...
    Think I'll try taking one away from http, giving it just 3 and see how it does.

    I'm thinking the ftp server would be nice for uploading/downloading from uSD card...

  • RaymanRayman Posts: 12,926

    FTP server seems to be working now, well sorta.
    It seems it can't really do much without a file system...

    Was surprised it asked for username and password.
    Had to look up: user=wiznet, pw=wiznet54321

    Guess I have to add in uSD support before it can do anything interesting...

  • RaymanRayman Posts: 12,926
    edited 2022-11-24 18:37

    FTP is now working with uSD card (note: you probably need to change pin definitions for uSD in Platfrom.h, I'm using different ones than Eval board).

    get, put, and dir work. That's all I use, so not sure what else may or may not work.

    Next, want to add uSD support to the HTTP part, so don't have to store files in RAM.

  • RaymanRayman Posts: 12,926

    Here it is configured for P2 Eval board.
    Remembered that I have this IDC extension cord for Eval that let me use this too wide adapter...

    Had to drop the clock from 250 MHz to 160 MHz to make it work, have to check on that...

    BTW: username and pw are both "w" now (because I got tired of typing long ones)

  • RaymanRayman Posts: 12,926

    Ok, there was a pretty bad bug in nearly all previous versions. Amazing it worked at all...
    Seems I called DNS_init() after using DNS instead of before.
    This probably made the code use random addresses for the buffer.

    Effect was that it wouldn't work on P2 Eval when clock was above 160 MHz. Very strange effect, but all better now.

    This version has Platform.h setting for P2 Eval board with basepin=16.

  • RaymanRayman Posts: 12,926

    The HTTP server can now serve files from uSD card.

    I think bad things might happen if you try to ftp and http large uSD files at the same time though...

    Think I'm about done here now. Just need to clean up and remove a lot of the embedded web content that is eating up HUB RAM. Can put all that on uSD now...

Sign In or Register to comment.