Skip to content

W5500 – A Little Trapping Before The Cutting

November 24, 2014

I’m going to have to chop off the six pin connector that brings the signals from the Arduino to the ioShield-A because it won’t fit on the olduino. Those signals are duplicated on the regular Arduino headers which is where the Olduino presents them. The board layout shows the signals being taken from the ICSP header and where they’re duplicated on the regular arduino headers.
14-11-24 ioShield-Brd
I’ve learned from bitter experience to test before I cut so I spent a few minutes with the data analyzer to trap the first little bit of spi conversation between an arduino and the ioShield. I was mostly interested in verifying the spi signal flow but the data make sense from my reading of the data sheet. For example, the first few frames below are setting the transmit and receive buffer sizes for sockets 0 and 1.
14-11-24 w5500spi

I wouldn’t want to reverse engineer the whole interaction like this but it will also give me a start on understanding the code. Here’s the initialization sequence in w5500.cpp. I’ll probably just copy it but i’ll know what i’m copying!

void W5500Class::init(void)
{

    initSS();
    delay(300);
    SPI.begin();

    for (int i=0; i<MAX_SOCK_NUM; i++) {
        uint8_t cntl_byte = (0x0C + (i<<5));
        write( 0x1E, cntl_byte, 2); //0x1E - Sn_RXBUF_SIZE
        write( 0x1F, cntl_byte, 2); //0x1F - Sn_TXBUF_SIZE
    }
}

Advertisements

From → web server

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: