---
title: "W5300 problem in sending UDP packets to PC"
url: "https://maker.wiznet.io/forum/13745"
markdown_url: "https://maker.wiznet.io/forum/13745/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "beygi"
created: "2020-03-17T03:26:08+09:00"
last_activity: "2020-03-20T03:04:50+09:00"
language: "en"
views: 744
replies: 3
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5300 problem in sending UDP packets to PC

## Question

Asked by beygi on 2020-03-17 in Ethernet Chips.

hi
i write a code for sending UDP data to PC.
but after the send first packet to PC, FIFO TX RSR register value set to 2 and never change untill i close port and open it again.

i use Spartan6 chip and VHDL language and set TMSR1 Register to X"3020";
also i use socket0 for sending UDP.

if i increse the UDP FIFO size, same problem is happend.

a part of code for sending UDP packet is attached:[UDP.pdf](https://maker.wiznet.io/forum/legacyFile.asp?path=wvgUq0ZmbEgjhX1nXlDZCU7PsEo.pdf) (16.4 KB)

thanks

## Replies

### Reply 1 by becky, 2020-03-17

beygi:

> FIFO TX RSR register

What is this? Is it the Sn_TX_FSR register?

beygi:

> set TMSR1 Register to X"3020";

Do you mean you set 0x3020 in TMS01R?
This is set to 48 bytes for socket 0 and 32 bytes for socket 1.
![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/d/d55d7a76ea01c43fa7232dbb65c60231813336c6.png)
Have you set the registers in accordance with the above?
You set the memory of socket 0 TX and socket 1 TX to 80, so the sum of the memory of the remaining sockets should be 48.

### Reply 2 by beygi, 2020-03-17 (in reply to reply 1)

becky:

> What is this? Is it the Sn_TX_FSR register?

yes sn_TX_FSR

becky:

> Do you mean you set 0x3020 in TMS01R?

i use socket0 for UDP and socket1 for TCP connection.

beygi:

> set TMSR1 Register to X"3020";

i set various size for TMS0 Register(and x"30" is one of them) but same problem is remain for all of sizes.

### Reply 3 by beygi, 2020-03-20

i can solve this problem!

but i did’t understand how this problem solved! it is very wonder for me.

now wiznet work without any problem! and work with very good speed

---

Source: https://maker.wiznet.io/forum/13745
