At what time the interrupt will accure
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: At what time the interrupt will accure
by Eugeny ·
After receiving interrupt you go and get data from the buffer. Thus the answer is after receiving some data driving device should get from the chip.
Under normal conditions you do not need to use TX_RD pointer, you use TX_WR pointer to fill the space with your data in the transmit buffer.
If you mean RX_RD then this pointer is increased with the size of the second frame (plus overhead in specific conditions) if second frame or data fits into the free space in the buffer. That’s why datasheet states to read pointer MSB first, and only then read LSB.
RE: RE: At what time the interrupt will accure
by switzigmann ·
There was a failure in my question. Yes of course i mean the receiving part.
To clarify:
I suppose i get a interrupt after receiving one ethernet frame. May be i can’t direct serve the interrupt.
Did send the W5500 a ack only after read the data , update the RX_RD and then send a RECV command.
At what time the ack will send.
The reason is that i have to fetch a large file and save it in a flash. So i only can serve one by one frame.
My steps after int sensed is.
Read RX_RSR to get the length of received data.
Read RX_RX_RD to get the startaddress where to read.
Transfer the data .
Update RX_RD
Send RECV Command.
RE: At what time the interrupt will accure
by Eugeny ·
Check W5100 datasheet chapter 5.
Behavior is slightly different in TCP and UDP modes. As you talk about ACK you most probably use TCP mode. In this mode new data will not be sent by the remote node until previous data is acknowledged by the W5500. There will be no data loss, the speed you serving interrupt with will define transfer speed. Alternatively, you may choose to use polling instead of interrupts.
RE: At what time the interrupt will accure
by switzigmann ·
Yes i use TCP
But your answers are different to my testing.
i ask the server to send me a response (approx 30k)
If i dont serve the interrupt very quick the SnRSR will overrun for example to 4K with Buffersize 4K.
Thats different to what you say, that the server only send further data after a ack from W5500.
At the Moment the Server dont stop to send data to the W5500. I think , normaly the W5500 has to reduce the window size that the server didnt send any data more.
RE: RE: At what time the interrupt will accure
by Eugeny ·
Second packet will contain 2048-1477=571 bytes of data making RX buffer full and TCP unable to proceed with more data until you remove data from the buffer.
Second packet will contain 4096-2937=1159 bytes of data making RX buffer full and TCP unable to proceed with more data until you remove data from the buffer.
In TCP mode remote node (server in your case) keeps track of window size of the W5500 and should not send more data that W5500 can accommodate. W5500 will ACK data it received successfully, and indicate to remote node how much free it has left in its RX buffer.
How do you know it?
Did you check W5100 datasheet chapter 5? And related register description in the W5500 datasheet?
RE: At what time the interrupt will accure
by switzigmann ·
I think it was a problem with the spi transfer and debugging.
I have removed nay breakpoints there and it works now.