---
title: "W5500 clear interrupt"
url: "https://maker.wiznet.io/forum/9300"
markdown_url: "https://maker.wiznet.io/forum/9300/md"
type: "Forum topic"
category: "MCU & Boards"
author: "arampee"
created: "2024-04-11T12:18:08+09:00"
last_activity: "2024-04-22T09:22:27+09:00"
language: "en"
views: 8
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5500 clear interrupt

## Question

Asked by arampee on 2024-04-11 in MCU & Boards.

Dear sir

I ''m jnut from Thailand. I'm asking for reassurance from friends or anyone. Now I have a problem with the function interrut W5500. After PIN INT active low can't be Active High, I'm not sure which part of the code is wrong or not. Is the procedure wrong?

SPI_Write (REG_INTLEVEL, 30); _delay_ms (1);
SPI_Write (REG_IR, 0x40); _delay_ms (1); //REG_IR Interrupt Register [R/W][0x0015][0x00]
SPI_Write (REG_IMR, 0x40); _delay_ms (1); //REG_IMR Interrupt Mask Register [R/W][0x0016][0x00]
SPI_Write (REG_SIR, 0x03); _delay_ms (1); //REG_SIR Socket Interrupt Register [R/W][0x0017][0x00]
SPI_Write (REG_SIMR,0x03); _delay_ms (1); //REG_SIMR Socket Interrupt Mask Register [R/W][0x0018][0x00]

Best Regards.

Jnut

## Replies

### Reply 1 by louis_m, 2024-04-22

Hi, you're using a W5500, right?
Inside the W5500's interrupt register, there is a
IR, IMR, SIR, SIMR in Common REG and Sn_IR, Sn_IMR in the Socket REG.

You can set IR->SIR, IMR->SIMR in order.
You can check the interrupt of all sockets by reading SIR and check the detailed interrupt of individual sockets by reading S1_IR.
For example, if you are using Socket 1 and want to get the interrupt pin low when the transmission is completed, you can set
SIMR = 0x2
S1_IMR = 0x10

Thanks.

---

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