---
title: "W5500 UDP stop sending after a while"
url: "https://maker.wiznet.io/forum/15271"
markdown_url: "https://maker.wiznet.io/forum/15271/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "besthere"
created: "2024-09-03T03:28:04+09:00"
last_activity: "2024-09-03T11:49:40+09:00"
language: "en"
views: 14
replies: 2
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5500 UDP stop sending after a while

## Question

Asked by besthere on 2024-09-03 in Ethernet Chips.

Hi,
I am doing udp communicate between stm32 + w5500 and pc.The loopback test works fine. Then I created two freertos tasks, one task poll-received pc data with socket 0 , and another task sent data to pc with socket 0 by uart data interrupt. It was found that the receiving task kept running steadily, while the sending task stopped after running for a period of time. I used ioLibrary_Driver and spi polling read/write methord. The criticalzone callback registered the freertos critical function.
Is there a conflict between using the same socket 0 for task scheduling transmission and reception？

## Replies

### Reply 1 by Eugeny, 2024-09-03

![](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/48.png) besthere:

> Is there a conflict between using the same socket 0 for task scheduling transmission and reception？

Not clear from your description if send and receive are fully asynchronous.
If yes, this may have problems - send and receive use same registers (e.g. status register, command register) and you must NOT run these handlers concurrently. Queue the tasks.

### Reply 2 by besthere, 2024-09-03 (in reply to reply 1)

Thank you for explanation and suggestion!
I have to do in full asynchronous application scenario. Now I used one socket receiving from pc and added another socket sending to pc. The test seems good with running about an hour without question.
But I still don’t quite understand why receiving kept stable while sending always stops when I used these handlers concurrently.

---

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