---
title: "RCV interrupt high but buffer len is 0"
url: "https://maker.wiznet.io/forum/11908"
markdown_url: "https://maker.wiznet.io/forum/11908/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "gossamer"
created: "2016-08-26T13:16:50+09:00"
last_activity: "2017-05-04T08:39:04+09:00"
language: "en"
views: 626
replies: 2
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# RCV interrupt high but buffer len is 0

## Question

Asked by gossamer on 2016-08-26 in Ethernet Chips.

I am getting interrupt status for socket that bytes are received, but when I try to read sockets receive size register, its value is 0.
Do I need to send command Receive before reading the register or this register will have size immediately after getting interrupt ?

Thanks

## Replies

### Reply 1 by Eugeny, 2016-09-12

Don’t you forget to reset this interrupt flag bit in your ISR? If you will not reset it manually W5100 will continue holding interrupt line active.

### Reply 2 by gossamer, 2016-09-13

So, I am polling the value of interrupt on common Reg Address (0x0015) and checking which socket received interrupt.
Then I read value of interrupt on socket reg address, and checking if RECV bit is set. if it is set, I am clearing a bit by writing (1&lt;&lt;2) on interrupt register.
And after that I read rx received size register 0x0*26 (0x0426 for socket 0). But I always read 0, even though I sent the character. I dont have pending interrupt after that, cause recv bit is reset, until next char of course. So, apart from actual reading of buffer, interrupts are working properly ![:frowning:](https://emoji.discourse-cdn.com/twitter/frowning.png?v=12)

*Edit*
Found the bug … totally retarded one. I was actually reading socket1 instead of socket0 ![:blush:](https://emoji.discourse-cdn.com/twitter/blush.png?v=12)
It is working now, at least the size of buffer, now I need to do the actual reading, but I have feeling it should be the same as sending something …

---

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