Trouble reading Sn_RX_RSR

Hello

I’m having trouble getting a wiz820io module to update the Sn_RX_RSR register upon reception of udp packets.

For context, I’m using a Altera Cyclone V, on the BeMicro CV board with a Nios II processor to drive the SPI lines. Using code from the Arduino library, W5200.h/W5200.cpp, I can successfully initiate and open a UDP socket to transmit packets to a remote device. I tested the device with an Arduino UNO and can transmit AND receive UDP packets to and from a remote device, so I am confident the module is physically OK.

Initialization and socket set-up follows:

  1. pull down reset pin for ~180 ms the wait for 300 ms before doing any SPI
  2. write(0x0000, 1 << 7); to clear internal registers to defaults
  3. write basic network settings: mac, ip, gateway, and subnet
  4. open socket with:
void openSocket() {
	SOCK_NUM = 0;
	execCmdSn(SOCK_NUM, Sock_CLOSE);
	writeSnIR(SOCK_NUM, 0x00FF);
	writeSnMR(SOCK_NUM, Mode_UDP | 0);
	writeSnPORT(SOCK_NUM, PORT);
	execCmdSn(SOCK_NUM, Sock_OPEN);
}

Following the above, I can successfully read the Sn_SR register; it will return 0x22 showing the correct mode for the open socket. At this point I can successfully run the sendUDP code. However if I start sending UDP (19 bytes including header) packets to the wiz820io from a remote device using a simple python script and read the Sn_RX_RSR register, it’s all zeros and never changes. The 2048 byte receive buffer does not appear to contain any data either.

Is there an additional initialization step to get the socket to receive data and update the received size register, could the module be resetting some how or clearing these registers and buffers, any ideas?

I’ve checked noise on the power rails and changed how long to hold the reset down before initializing for a UDP socket. Nothing seems to help.

thanks
bschup