---
title: "Regarding interrupts"
url: "https://maker.wiznet.io/forum/11031"
markdown_url: "https://maker.wiznet.io/forum/11031/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "Eugeny"
created: "2015-05-08T12:04:51+09:00"
last_activity: "2017-05-04T08:35:34+09:00"
language: "en"
views: 603
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Regarding interrupts

## Question

Asked by Eugeny on 2015-05-08 in Ethernet Chips.

Hello, I am sorry I have to ask question again, Wiznet please reply. I asked similar question in one of previous threads, it remained unanswered.

I have receive operation serviced in interrupt routine. This means when interrupt occurs, I find out that it is RECV-related, and process data in the W5100’s receive buffer.

Imagine W5100 in TCP “established” state, or in UDP “sock_udp” state. Data came in, and I got hardware interrupt, went into interrupt handling routine, cleared RECV interrupt in Sn_IR, and is performing processing of received data. BUT in this processing routine I have got CPU interrupts enabled (I can not change it), and if W5100 will make another interrupt, all communication is messed, and even probably machine will crash.

The question is: if W5100 has got data and raised software and hardware interrupt, I cleared this interrupt using Sn_IR, may W5100 raise ANOTHER interrupt while I am working on its receive buffer?

Looking to the datasheet I guess that to let W5100 continue receiving data (and thus raise another interrupt for receive operation) C_RECV command is needed for socket. Until I issue it, no receiving and thus interrupt occurs.

But I need explicit confirmation of this behavior.
Please reply ASAP.

## Replies

### Reply 1 by bangbh, 2015-05-11

Hi, Eugeny.

I 'm peter employee of wiznet.

W5100 interrupt can occur during your interrupt service routine run.

I think that the problem is your interrupt routine takes too long time.

But I don’t know about your code, hardware environment or test environment. If you show me, it will be very helpful to solve the problem.

Thanks.

---

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