Regarding interrupts

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.

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.