I have completely activate the SPI communication. I can read and write data to W5500 chip. I checked from scope and from keil.
I am going to use this chip for tcp communication. My master is a Freescale KL25 MCU and w5500 is my slave.
I have found the tcp guide for w5500.
For now I am just using socket 0.
I have written the gateway, source IP and read them. They are ok.I can read them.
then for tcp:
1- I adjusted the mode register for TCP usage.( 0x01) (I read this value correctly)
2-I adjusted port adress as 31000 (I read this value correctly)
3- Command register, SN_CR= 0x01 (Open the port)
the problem starts here. I should read 0x13(SOCK_INIT) from the status register. However I cannot read that value.
Then I will have w5500 to go listen mode.
Could you please help me what should I do. Is there anything I should do write or check ?