I am using STM32F4 and W5500. I connected to the ioLibrary project. SPI it works fine.
Network parameters successfully installed and W5500 pinged lossless.
Creates a socket, but when debugging function freezes…
socket(0, Sn_MR_TCP, 1005, 0);
It hangs on the function close() at line: while( getSn_CR(sn) );
Please tell me what could be the reason?
Forgive me for my english, I’m from Russia
I figured, just in write_spi(uint8_t wr_byte); needed to add a function read to read the first byte read differently corresponded previously accepted values.
void write_spi(uint8_t wr_byte)
while(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_BSY) == SET);
SPI_I2S_ReceiveData(SPI1); /* that’s what was missing */
Everything is working.