Have you encountered the pitfalls during LAN8720 debugging?
▲Click on the official account business card above to follow Learn more▲
Recently, I was debugging an Ethernet chip called LAN8720. The peripheral circuit is actually very simple, but we still encountered some problems. I would like to share two important points with you.
First, let me briefly introduce the LAN8720 chip.
figure 1
This is a 10M/100M Ethernet PHY chip with a very small package and RMII interface support, and supports HP-Auto-MDIX automatic
flip function.
RMII? Those who have never come across it may not know what it means? Simply put, RMII is an interface that has fewer I/O transmissions than the MII interface. It has half the signal lines for data transmission and reception than the MII interface.
All RMII data ports share a common clock for sending and receiving on all ports, which saves a lot of ports .
An RMII port requires 7 data lines, half as many as an MII port, so the switch can access ports with twice as many data lines.
The functional block diagram is as follows
Figure 2 Functional block diagram
Supports full-duplex and half-duplex modes
LED light output with two states
A 25MHz crystal can be used to reduce costs
We found two problems in our test:
1. REFCLKO pin function configuration
2.1.2V Internal Regulator Configuration
1. Problem Record
1. nINT/REFCLKO pin function configuration error
In order to reduce costs, we use a 25MHz crystal oscillator. In theory, the chip will multiply the frequency to 50MHz and send it to the microcontroller.
Figure 3 25M crystal oscillator circuit
In fact, we did not detect a frequency of 50MHz.
2. Internal regulator 1.2V configuration error
We used a 1.2V internal regulator, but during actual testing, we did not measure 1.2V.
2. Analyze the problem
Check the manual and get two key information
1. The nINT/REFCLKO pin can be used as an interrupt output or a reference clock output. Through the LED2 pin setting, the value of the LED2 pin is read by the LAN8720 after the chip is reset.
When this pin is pulled up (or floating, with a built-in pull-up resistor), the nINT/REFCLKO pin is an interrupt output. When this pin is connected to a pull-down resistor, the nINT/REFCLKO pin is a clock output.
In fact, our design is like this
Figure 4: Incorrect LED configuration circuit
We select nINT/REFCLKO pin as clock output , LED2 should be pulled down.
In clock output mode, an external 25MHz crystal oscillator can be connected, multiplied to 50MHz internally, and then a 50MHz reference clock is output to the MAC control through the REFCLKO pin.
You can also directly connect an external 50MHz crystal oscillator and then send it directly to REFCLKO through a resistor with a smaller resistance.
Figure 5 50MHz crystal oscillator configuration circuit
2. The chip needs 1.2V to power VDDCR, but the chip has an internal 1.2V regulator, and LED1 can be used to configure whether to use the internal regulator. When the internal regulator is not used, an external 1.2V power supply must be used.
These two important pieces of information are:
The configuration of LED1 and LED2 is very important. Simply put, the 50MHz clock output and the reference voltage 1.2V are configured through these two pins.
3. Problem Solving
The power supply of LED1 and LED2 is disconnected, and the chip pins are connected to 10K pull-down resistors, as shown in the figure below. At this time, both the 1.2V voltage and the 50MHz frequency are available.
Figure 6 Correct LED configuration circuit
After successful debugging, LED2 will be always on and LED1 will flash continuously.
Share some tips
The chip package is very small, and the middle pad is grounded. It is easy to short-circuit with the adjacent pins during soldering. You can dig a hole in the middle part and the excess solder will overflow from the back of the board.
Figure 7 LAN8720 package
The above is what I shared today, I hope it will be helpful to you.
-
Circuit schematic design, the English abbreviations you have to know
-
Ten things to note when designing microcontroller peripheral circuits
-
Comprehensive review of the first public account articles in 2021
-
Useful information | Share an actual EMC case and rectification process
-
It took seven rectifications and half a month to make a painful EMC summary.
-
I want to become a hardware engineer, is there any better way?
---The end---
Scan the QR code for free for a limited time to join the group and exchange more industry technologies
Recommended reading ▼
Huawei HiSilicon software and hardware development materials