Hi
I’m using W5200 and your driver V1.5 with my STM32F103 board.
I have written the initial registers such (GAR, SUBR SIPR etc)
all are ok.
But When I try to initiate sockets by sending following fucntion
socket(s, Sn_MR_TCP , S0_SourcePort, 0)
The w5200 chip starts endless loop
I have debugged in detail. The cpu is going to endless loop in close(s) command
The cpu sends Sn_CR_CLOSE command. But the chip is not operating.
Sn_CR(0) register content is always 0xFF after sending the close command.
It should be cleared to 0x00 automatically
*/
void close(SOCKET s)
{
#ifdef DEF_IINCHIP_DBG
printf(“close()\r\n”);
#endif
IINCHIP_WRITE(Sn_CR(s),Sn_CR_CLOSE);
/* wait to process the command... */
while( IINCHIP_READ(Sn_CR(s)) )
;
/* ------- */
/* all clear */
IINCHIP_WRITE(Sn_IR(s), 0xFF);
}
Rgds