W5200 - Write/Read of registers and memory
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: W5200 - Write/Read of registers and memory
by hjjeon0608 ·
Hi, NEC
I think you use SPI interface.
You should design with SPI read/write timing.
The timing is in datasheet chapter 6. External interface.
Best regards.
RE: W5200 - Write/Read of registers and memory
by NEC ·
Hi hjjeon0608,
Thanks very much for your reply. Yes, im using the SPI interface, currently at 2MHz. I’m aware of the timings, at least the ones in chapter 7.4.3. Since these are all in the range of ns and my clock is only 2MHz these should be fine.
Below I’ve put three succeeding captures of my communication, they show the update of Sn_WR_TX and the SEND command, while reading SN_WR_TX before and after the SEND.
The first part of the following capture shows writing to the Sn_TX_WR register 0x4024. The value to be written is the new pointer location 0x9578. The second command is reading back the same register right after the write. As can be seen the value is not 0x9578, but 0x9532 which equals the value before the write.



This capture shows the SEND command and reading of the Sn_CR register (bit is already cleared at the time of read).
Right afterwards Sn_TX_WR is read again, now returning 0x9578 as written in the first capture.
Why can Sn_TX_WR not be read right after writing it? As far as I found out today this is not whats causing my problems, nevertheless it seems strange to me and could get me into trouble at another point if not taken into account.
Best regards.
RE: W5200 - Write/Read of registers and memory
by hjjeon0608 ·
Hi, NEC.
TX write pointer register is different a little bit.
The register is not updated until operating send or send_mac command.
So, when you read TX write pointer register after write value to TX write pointer register, you cannot read correct value.
Best regards.