WIZnet Developer Forum

SPI Read errors on W5500

I’ve started using a W5500 on a WIZ850io board. I am using a microcontroller to talk to the W5500 over the SPI. I can write and configure the device, but when I read back I get errors on two out of every four bytes (when bit 1 is set to 1). Example - set Common Register Block to: mode 00, Gateway address 192.168.1.1 (C0.A8.01.01), Subnet mask 255.255.255.0 (FF.FF.FF.00), SHAR 00.08.DC.01.02.03
Expected:
00 C0 A8 01 01 FF FF FF 00 00 08 DC 01 02 03
Read:
00 C0 02 02 01 FF FE FE 00 00 B8 B8 01 02 81 81 etc
The writes are correct as I can Ping the IP address and an ARP request shows the configured hardware address. But the error stops me reading many status registers (PHYCFGR, S0_SR etc). I haven’t tried reading the Rx buffer, but I expect the same result.
I get the same result on two W850io boards. Any suggestions as to what could be wrong?

The minimum guaranteed speed of the SCLK is 33.3 MHz which was tested and measured with the stable waveform.
Therefore you need to confirm the used SPI Clock frequency.

The microcontroller is running an 11MHz Clock with SPI interface set to half rate. I may have found the problem myself. Connecting a logic analyser to the SPI pins resolved the issue. Disconnect, and it returns. I need to look at the connections better. Thanks for you reply.

thanks my issue has been fixed.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.