Hi,
Check the mask value of IMR regsiter.
When the mask value set as ‘1’ ans the coresponding bit also set as ‘1’ , Interrupt oucurrs.
Others, no interrupt oucurrs.
And, check the hardwire connection to MCU’s intterupt input pin with W5100’s /INT pin.
And, Check your MCU’s interrupt control as sensitivity and polarity.
[quote]Check the mask value of IMR regsiter.
When the mask value set as ‘1’ ans the coresponding bit also set as ‘1’ , Interrupt oucurrs.
Others, no interrupt oucurrs.[/quote]
Since the interrupts do occur when not reading the status register, or after adding a delay to the loop, the mask is set correctly. If it wasn’t I wouldn’t receive interrupts under any condition.
Again, since I am getting interrupts under certain conditions, it is obvious that the hardware is wired correctly.
And again, since I am getting interrupts under certain conditions, it is obvious this is set correctly.
The only difference is a 20us delay added in the loop, and it makes all the difference. Is the W5100 unable to pull the interrupt pin if it’s register are being read?
Hi,
According to what you said, The related Interrupt configuration & hardware is all ok.
I wonder how to process Sn_IR register and what is your ISR routine.
Sn_IR represents the interrupt of socket such as CONNECT,DISCON,RECV,SENDOK and TIMEOUT.
if Sn_IR is not zero and Sn_IR mask bit is set, n bit of IR become set and Interrupt pin hold low until IR is not zero.
Although IR is not zero, another interrupt can be occurred without changing the interrupt pin.
So, Once interrupt is detected, you should process all IR bit and clear all Sn_IR.
[quote]I wonder how to process Sn_IR register and what is your ISR routine.
Sn_IR represents the interrupt of socket such as CONNECT,DISCON,RECV,SENDOK and TIMEOUT.
if Sn_IR is not zero and Sn_IR mask bit is set, n bit of IR become set and Interrupt pin hold low until IR is not zero.
Although IR is not zero, another interrupt can be occurred without changing the interrupt pin.
So, Once interrupt is detected, you should process all IR bit and clear all Sn_IR.[/quote]
This is exactly what I’m doing. I modeled it after the examples and the information in the datasheet.
I ask that you please take the time to test yourself. Create a simple loop to repeatedly read the status register, and see if it prevents the interrupts from firing. Knowing if you experience the same problem will be very helpful.
[quote]1. To use system bus interface mode, pull down the SEN pin.
2. You can’t use both MCU system bus I/F mode and SPI I/F mode simultaneously.[/quote]
Yes, we are aware of this. The “DNI” (Do Not Insert) is only there in case we change our minds, so we don’t have to refabricate a PCB.
If yes, check the the MCU interrupt to be enabled or be disabled.
W5100 basic SPI IO operation as IINCHIP_READ, IINCHIP_WRITE, IINCHIP_READ_BUF, and IINCHIP_WRTIE_BUF in wiznet driver code diable the MCU interrupt until A register read/written is completed. Refer to IINCHIP_ENABLE() and IINCHIP_DISABLE().
I think MCU can’t recognize the intrerrupt of 5100 generated during MCU interrupt is disabled by the code as IINCHIP_DISABLE() & IINCHIP_ENABLE().