WIZnet Developer Forum

Socket interrupt mast not working

In my case, I wish to mask out the SEND_OK field of Sn_IR of all my sockets so that SEND_OK will not interrupt me.

So I write 0b00001111 to Sn_IMR for all my sockets. After writing, I simply read the Sn_IMR register and it is the same as what I have written in which proves that my writing to Sn_IMR is valid.

But later on, when I am transferring data with external clients, when I read the Sn_IR, the SEND_OK interrupt field still turns 1, which (as I wish) should have been masked out.

Am I doing it wrong? or my chip is broken? Any advises are appreciated.

You seem do not understand what interrupt is. Interrupt is low level signal generated on the INT pin of the chip. It informs controlling device that W5500 is having state change - using hardware notification.
Socket interrupt register contains set of flags, which indicate W5500 state changes. If respective IMR bit it set, and IR bit sets, W5500 activates INT pin. If repsective IMR bit is reset, and respective IR bit sets, INT pin does not change its state and hardware interrupt does not occur.

Because the hardware designer does not realy connect the INT pin, we are simply pooling it, which is still a good choice since using this method we actually merged ckecking of multiple events into one register reading. The key point is in our method, the socket interrupt mask will take effect only on overall interrupt register level.

you have to set SIR(Socket Interrupt) and SIMR(Socket Interrupt Mask) and then you can check Sn_IR(Socket n Interrupt) for checking interrupt event.

also you have to set Sn_IMR for any of socket you use,too

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