I have recently desinged 5 pic pcb boards with STM32F103 and W5500 chip for TCPIP connection. Unfortunately, I didn’t mind that there is no Library for FDM mode and I have tied SCSn pin to the ground via 10kOhm resistor. I am trying to modified the reference code for write/read functions but the chip does’t work properly. For example, when I write mac address and read it back, it seems like the chip register is storing only the last value. Below you will find the mofication code for FDM 1 byte. Have you any idea what I am doing wrong?
void WIZCHIP_WRITE_BUF(uint32_t AddrSel, uint8_t* pBuf, uint16_t len)
AddrSel |= (W5500_SPI_WRITE | W5500_SPI_FDM_OP_LEN1);
if(!WIZCHIP.IF.SPI._write_burst) // byte operation
for(i = 0; i < len; i++)
WIZCHIP.IF.SPI._write_byte((AddrSel & 0x00FF0000) >> 16); WIZCHIP.IF.SPI._write_byte((AddrSel & 0x0000FF00) >> 8); WIZCHIP.IF.SPI._write_byte((AddrSel & 0x000000FF) >> 0); AddrSel += (1 << 8); WIZCHIP.IF.SPI._write_byte(pBuf[i]); }