Before any question excuse me for my English. My language isn’t English.
I want to write a simple test code for W5500 with Arduino Due. W5500 works as a client and
my PC works as a server. The code saves a character in TX buffer and sends it to my PC.
My code performs the following tasks:
- loading common registers with appropriate values
- opening the socket0 in TCP mode
- connecting to server
until here all things are perfect, but when i run send command (Sn_CR=0x20), the server receives arbitrary bytes. I perform updating process of Sn_TX_WR with respect to data sheet.
Also, according to W5500 data sheet after connecting to server in TCP
mode, the value of Sn_TX_RD and Sn_TX_WR will be re-initialized to 0x0000.
But when i read these registers after connect command (Sn_CR=0x04), W5500 returns arbitrary numbers for both and these values are same for these registers. Also the value of Sn_TX_FSR
reads as 0X0800 which is correct.
When i read these registers after send command (Sn_CR=0x20), W5500 returns 0x0000 for
Sn_TX_WR and Sn_TX_RD and an arbitrary number for Sn_TX_FRS.
I don’t know where is the problem. Can anyone help me???
Thanks in advance.