Can’t get example code to function. According my logic analyzer, SPI seems to not be working properly. Getting all zeroes when running register dump and getnetinfo. I’m running Keil V5. Tried the stmcube example with no joy as well. I’ve included my project code.
I think you set just one byte read and write functions like this. “reg_wizchip_spi_cbfunc(spi_rb, spi_wb,0,0);”
wiznet spi interface supports burst read and write.
In the getnetinfo function, many functions use burst read/write like WIZCHIP_READ_BUF/ WIZCHIP_WRITE_BUF.
You must set this function, too.
Thanks, taylor.
You post was helpful.
As I posted to dkay, the wiznet team should post an STMcube DHCP example.
I’m finding the learning curve on the 6100 library is quite steep even with prior 5500 experience.
I am pleased with the team’s choice of microcontroller for the 6100 evb.
TrueStudio 9.1 HAL 드라이버를 사용하고 있는데… 유사한 증상이있어 자료를 찾다가 궁금한 점이 있어 문의드립니다.
void W6100Initialze(void) 안에 현재
reg_wizchip_spi_cbfunc(W6100SpiReadByte, W6100SpiWriteByte, 0, 0); 이렇게 되어 있는데 구체적으로 어떤 function을 선언해 줘야하는것인가요?
Hercules로 확인해 보면
PHY OK.
Register value after W6100 initialize!
VERSION(200) = 00
Mac address: 00:00:00:00:00:00
IP address : 0.0.0.0
SM Mask : 0.0.0.0
Gate way : 0.0.0.0
DNS Server : 168.126.63.1
GW6 : 0000:0000:0000:0000:0000:0000:0000:0000
LLA : 0000:0000:0000:0000:0000:0000:0000:0000
GUA : 0000:0000:0000:0000:0000:0000:0000:0000
SUB6 : 0000:0000:0000:0000:0000:0000:0000:0000
NETCFGLOCK : 1
0:Opened, UDP loopback, port [50000] as IPv4 mode
이렇게 나오는데, #define DMA를 wizchip_init.h 파일에 선언해 주면…
PHY OK.
Register value after W6100 initialize!
VERSION(200) = 00
Mac address: 00:08:dc:ff:ff:ff
IP address : 192.168.177.25
SM Mask : 255.255.255.0
Gate way : 192.168.177.1
DNS Server : 168.126.63.1
GW6 : 0000:0000:0000:0000:0000:0000:0000:0000
LLA : FE80:0000:0000:0000:0208:DCFF:FE57:5725
GUA : 0000:0000:0000:0000:0000:0000:0000:0000
SUB6 : FFFF:FFFF:FFFF:FFFF:0000:0000:0000:0000
printf(“VERSION(%x) = %.2x \r\n”, VER,getVER());
print_network_information();
위와 같이 그대로 따라 했으면 되었을텐데 SPI가 먼저 선언되는 바람에 BoardInitialze();에서 spiInitailize();를 생략했기 때문이었습니다…
아래와 같이 정리를 하니 예제에 나와있는것 같이 잘 초기화가 진행되었습니다.
spi_set_func(&hspi1);
MX_SPI1_Init(); //먼저있던 SPI1을 이부분에서 선언…
W6100Initialze();