I am using w5500 with nuvoton MCU. I can’t set my init settings. I am checking from the ip scanner application. I’ve written my code snippet below. Can you help me please?
void cs_sel(void) {
CSB = 0;
}
void cs_desel(void) {
CSB = 1;
}
uint8_t spi_rb(void){
uint8_t rbuf;
rbuf= SPI_READ_RX(SPI0);
return rbuf;
}
void spi_wb(uint8_t b){
SPI_WRITE_TX(SPI0,b);
}
reg_wizchip_cs_cbfunc(cs_sel, cs_desel);
reg_wizchip_spi_cbfunc(spi_rb, spi_wb);
wizchip_init(bufSize, bufSize);
wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0x1d, 0x29, 0xd7}, // Mac address
.ip = {192, 168, 1, 36}, // IP address
.sn = {255, 255, 255, 0}, // Subnet mask
.gw = {192, 168, 1, 1}}; // Gateway address
wizchip_setnetinfo(&netInfo);
wizchip_getnetinfo(&netInfo);
void SPI_Init(void)
{
SPI_Open(SPI0, SPI_MASTER, SPI_MODE_0, 8, SPI_CLK_FREQ);
SPI_DisableAutoSS(SPI0);
SPI_SET_MSB_FIRST(SPI0);
}