I use W5500 with STM32F051R8T6, my IDE is Keil. I ported some part of code to this chip and communication by SPI works well. I also have succes with STM32F103X CooCox CoIDE Project Loopback Test - works perfect.
I have problem with DHCP client. When I run this project I have go HardFault. Here is my console output:
[code]=== W5500 NET CONF : DHCP ===
MAC: 00:08:DC:00:AB:CD
SIP: 192.168.1.123
GAR: 192.168.1.1
SUB: 255.255.255.0
DNS: 0.0.0.0
Send DHCP_DISCOVER
DHCP message : 192.168.1.1(67) 345 received.
Receive DHCP_OFFER
Send DHCP_REQUEST
DHCP message : 192.168.1.1(67) 345 received.
Receive DHCP_ACK
HardFault[/code]
during debug I have found that hardfault is occur in this line:
if(*((uint32_t*)addr) == 0) return SOCKERR_IPINVALID;
in function
int32_t sendto(uint8_t sn, uint8_t * buf, uint16_t len, uint8_t * addr, uint16_t port)
What could be the problem?