INTn pin always high


I’m trying to get falling edge interrupt for per UDP receive message. Here my init codes but it didn’t work, INTn pin always high.

	reg_wizchip_spi_cbfunc(readByte, writeByte);
	reg_wizchip_cs_cbfunc(csSelect, csDeselect);

	wizchip_init(w5500.spiBuffer, w5500.spiBuffer);
	setSn_IMR(w5500.socketNumber, 0x04);

	w5500.result = socket(w5500.socketNumber, Sn_MR_UDP, w5500.localPort, 0); // 

According to the code above, it is normal for an interrupt to occur.
First I want you to check if udp data receive is done.
Also, I wonder how the interrupt row is checked.

Hello, here mine RX code part

void w5500RX() {

	if (wizphy_getphylink() > 0) { //Check Ethernet cable up or down

		switch (getSn_SR(w5500.socketNumber)) { //Get status of selected socket
		case SOCK_UDP:

			if (getSn_IR(w5500.socketNumber) == 0x04) { //Sn_IR_RECV -> RX interrupt

				if (getSn_RX_RSR(w5500.socketNumber) > 0) { //If rx buffer is not empty

					memset(w5500.rxMessage, 0, w5500.rxBufferLength); //Erase all buffer before receive
					w5500.rxBufferLength = getSn_RX_RSR(w5500.socketNumber);
					recvfrom(w5500.socketNumber, rxBuffer_ptr,
							w5500.rxBufferLength, w5500.remoteIp,
							&w5500.remotePort); //Receive command

					for (int i = 0; i < (w5500.rxBufferLength - 8); i++) { //Copy message memory to struct

						w5500.rxMessage[i] = *(rxBuffer_ptr + i);
					memset(rxBuffer_ptr, 0, w5500.rxBufferLength);
		case SOCK_CLOSED: //If socket closed, try to connect again
			socket(w5500.socketNumber, Sn_MR_UDP, w5500.localPort, 0); // 0 -> No flag need at UDP


Falling edge interrupt working at mcu side I have tested already.

Best regards.

Are you on this condition?

I can’t see the code to clear the interrupt, are you clearing it?

Yes code enter if (getSn_IR(w5500.socketNumber) == 0x04).
I can’t see any change on INTn pin. As I understand pin stays low until I clear interrupt. If pin fall, I will add clear interrupt.

What is the w5500.socketNumber ?
In your code it should be zero.

Yes, it’s zero. I’m taking messages on UDP no problem there.