WIZnet Developer Forum

Activate HW Interrupt in W5500

Hello, I’m trying to enable HW INT on w5500 with STM32H7. I’m sending and receiving UDP packages successfully but can’t see any rise edge on INT pin.

Here my code block for turn on hw interrupt.

void w5500Init(){
.
.
. setIMR(0x04);
setSIMR(0x01);
setINTLEVEL(30);
.
.
}
What’s wrong I couldn’t get.

Thanks.

Hardware Interrupt Pin of W5500 is a falling edge. If an interrupt occurs in HIGH state, it is converted to LOW, and it is converted to HIGH when you clear the interrupt.

I got it how it works but interrupt pin stays at high. I want to get hw interrupt for receive moment at UDP…
I’m not sure this init is true which is showing below.

setSn_IMR(w5500.socketNumber, 0x04);
setSn_IR(w5500.socketNumber, 0x1F);
setINTLEVEL(50);

To generate an interrupt in the socket’s recv timing, masking is required in the sn_imr and simr registers.
If udp socket is socket 0, set SIMR (0x01).

This is correct masking to get the recv interrupt.

I’m using like this.

w5500.result = socket(w5500.socketNumber, Sn_MR_UDP, w5500.localPort, 0); // 0 -> No flag need at UDP

setINTLEVEL(500);
setSIMR(0x01);
setSn_IMR(w5500.socketNumber, 0x04);

Still no falling signal occurs.

Should I clear or reset interrupts somewhere in my loop?

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.