Good afternoon!
I’m interfacing a wiz550io with a msp430 (msp430f2416). I’ve set up SPI on the MSP as follows:
- MSB
- 8 bit
- Clock polarity inactive low
- Clock phase: Data is captured on the first clock edge and changed on the following edge.
- speed is ~1MHz
my main loop goes approximately like this:
RST pin low for ~1 sec
RST pin high for ~0.5secreg_wizchip_spi_cbfunc(spi_readbyte, spi_writebyte);
reg_wizchip_cs_cbfunc(spi_cs_on, spi_cs_off);rb = getVERSIONR();
printf(“version nr %x\n”, rb);wiz_NetInfo netInfo;
wiz_NetInfo netInfo2 = { .mac = {0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, // Mac address
.ip = {2, 2, 2, 2}, // IP address
.sn = {3, 3, 3, 3}, // Subnet mask
.gw = {4, 4, 4, 4}}; // Gateway address
wizchip_setnetinfo(&netInfo2);
wizchip_getnetinfo(&netInfo);
printf(“IP: %i %i %i %i\n”, netInfo.ip[0], netInfo.ip[1], netInfo.ip[2], netInfo.ip[3]);
My results are:
version nr 2
IP: 2 3 0 192
Why is version number wrong? (Should be 0x04)
Why are IP numbers way off?
SPI is tested to work correctly when i connect MOSI directly to MISO and send various dummy bytes.
I’ve scoured this forum and else where and simply do not see what is missing.
Hoping for a quick reply! Thanks in advance!