I have a custom board using a W5500 IC and the ioLibrary. SPI communication itself appears to work, as I can change values on the W5500 via wizchip_setnetinfo and reading it back via wizchip_getnetinfo. However attempting to open any socket causes the program to hang indefinitely in the close() function at . Running the same code on one of the cheap Aliexpress Boards (larger, blue PCB one) works however. Also plugging in a network cable does not blink the LINK Led on my custom board, while it does on the Aliexpress one. Does anyone have an idea what I’m doing incorrectly?
You seems have made a number of mistakes in your board.
Very likely. It’s my first slightly more complex design compared to those that I could easily plug together on a breadboard. So any help is greatly appreciated.
C6 is connectred wrongly;
Where exactly is the mistake? It’s connected to the transmission center tap of the RJ45 Magjack and ground, the same as in the reference schematic (C8 in that one).
R11/R13 must be 49.9 Ohms 1%, you have more than 2% deviation;
Right. Not sure where I got 51R from.
Why did you use 82 Ohm resistors for R14 and R15? These are for external fransformer type reference circuit. For built-in transformer magkjack they are 49.9 Ohms;
Good catch. Looks like I used the external schematic there for some reason.
Why 10p capacitors for crystal oscillator? Did you perform calculations for the right values basing on crystal capacities?
I’ve been using an Epson FA-20H 25.0000MF20X-K3 crystal with a 10pF load capacitance. I followed the formula found in the ST Oscillator design guide (AN2867) (CL = (C1*C2) / (C1+C2) + CStray), which yields me a C1/C2 value of 10pF for an assumed 5pF stray PCB capacitance. This is one thing that I’m especially unsure about, as I have very little experience with external oscillators.
Are required key resistors having 1% tolerance?
All resistors I used are 1%.
Is there any connection between 3V3 and 3V3A?
Yes, via an inductor (L1 on the PCB). I double checked an measured that 3V3A is present on the W5500.
Is reset pin (W5500_Reset) driven or left connected to 3V3 through pull-up only as on the circuit?
It’s hooked up to the main MCU (STM32F401RET), which pulls it down for 500ms pre-initialization and then pulls it back up to force a clean reset. I’m waiting for another 500ms before continuing with the initialization (via wizchip_init) to ensure the chip is ready (the W5500 datasheet specifies 150ms for that, but I’d rather be safe).
I’ve swapped out the Resistors with some 49.9R 1% now and this gets me a bit further. Now I end up getting stuck a few lines further in the socket function .