Embedded Ethernet Module (A3053) Design and Development

© 2025 Kevan Hashemi, Open Source Instruments Inc.

Contents

Design
Development
Q3-2025

Design

[21-AUG-25] All our designs are free and open-source, copyright Open Source Instruments Inc, under the GPL 3.0 license.

Development

Q3-2025

[04-AUG-25] Settle upon MCU and Ethernet PHY. In this HTML page we are trying out a Markdown renderer, which we may or may not employ in new entries. Examine the HTML source code for the markdown script and configuration. We use a dedicated "md" tag for the Markdown fields. If the browser fails to load the converter JavaScript, the HTML will instead replace the "md" with a "pre" field so we can still see the Markdown formatting.

[08-AUG-25] We want the PIC32MZ in TQFP-100 to provide an RMII (Reduced Media Independent Interface), JTAG (four-wire programming of PIC32MZ), ISCP (two-wire programming of PIC32MZ), and an eight-bit external data buse (for communicating with the LWDAQ controller). We will have the PIC32MZ as U1 on the circuit, the LAN8720A Ethernet physical layer as U2, and the MPCIE connector as P1. Here are the required connections between U1 and U2 for the RMII.

PIC32MZ Signal U1 Pin LAN8720A Signal U2 Pin Description
ERXD0U1-41RXD0/MODE0U2-8Receive Data 0
ERXD1U1-42RXD1/MODE1U2-7Receive Data 1
ERXERRU1-35RXERU2-10Receive Error Input
ETXD0U1-86TXD0U2-17Transmit Data 0
ETXD1U1-85TXD1U2-18Transmit Data 1
ETXENU1-77TXENU2-16Transmit Enable
EMDCU1-70MDCU2-13Management Data Clock
EMDIOU1-71MDIOU2-12Management Data
EREFCLKU1-16REFCLKOU2-14Reference Clock Out
ECRSDVU1-12CRS_DV/MODE2U2-11Carrier Sense Data Valid
Table: Reduced Media Independent Interface (RMII) Bus Between PIC32MZ and LAN8720A LAN8720A. Copied from PIC32MZ data sheet, Table 1-17, TQFP-100 package pins. The REFCLKO to EREFCLK connection is one way to synchronize the bus.

The LAN8720A requires /RESET on its nRST input, U2-15, which arrives on the board through mPCIe pin P1-16. There are various ways to provide a clock for the synchronous RMII bus. We will load a single 50-MHz oscillator on our board and drive three inputs with the oscillator signal directly: U1-16, U1-49, and U2-5. These are the EREFCLK and OSC1 inputs of the PIC32MZ, and the XTAL1 input of the LAN8720A. We leave U2-4 floating. We route unused, multi-purpose GPIOs from the PIC32MZ to all the connections on the mPCIe connector that have a signal function on the RCM6700. For the six programming connections, we give the programming bus name and the short signal name. These signals are PGC and PGC for the ICSP bus and TCK, TMS, TDI, and TDO for the JTAG bus.

A3053A Signal RCM6700 Signal mPCIe Pin
0VGNDP1-1
+3V3+3.3 VP1-2
U2-21, TXPTx+P1-3
U2-23, RXPRx+P1-4
U2-20, TXNTx−P1-5
U2-22, RXNRx−P1-6
U2-3, LINKLNKP1-7
ECOMECOMP1-8
U1-97, RG13PE0P1-9
U1-2, RA5PE1P1-10
U1-10, RG6PE2P1-11
U1-82, RD5PE3P1-12
U1-11, RG7PE5P1-13
U1-81, RD4PE6P1-14
U1-18, RE8PE7P1-15
U1-15, /MCLR/RESET_INP1-16
U1-20, RB5PD0P1-17
U1-21, RB4PD1/IA6P1-18
U1-22, RB3PD2P1-19
U1-23, RB2PD3/IA7P1-20
U1-26, RB6PC0P1-21
U1-27, RB7PC1P1-22
U1-32, RB8PC2P1-23
U1-33, RB9PC3P1-24
U1-34, RB10PC4P1-25
U1-43, RB14PC5P1-26
U1-44, RB15PB0P1-27
U1-15, /MCLR/RESETP1-28
U1-6, RC1IA0P1-29
U1-7, RC2IA1P1-30
U1-8, RC3IA2P1-31
U1-9, RC4IA3P1-32
U1-91, RE0IA4P1-33
U1-94, RE1IA5P1-34
U1-72, SOSCI/RC13PA0P1-35
U1-73, SOSCO/RC14PA1P1-36
U1-98, RE2PA2P1-37
U1-99, RE3PA3P1-38
U1-100, RE4PA4P1-39
U1-3, RE5PA5P1-40
U1-4, RE6PA6P1-41
U1-5, RE7PA7P1-42
U1-28, RA9/IORDP1-43
U1-24, PGEC1/RB1VBAT_EXTP1-44
U1-19, RE9/IOWRP1-45
U1-38, TCK/RA1SCLKA/IA7P1-46
U1-25, PGED1/RB0STATUSP1-47
U1-17, TMS/RA0TXA/PC6P1-48
U1-39, TDI/RF13SMODEP1-49
U1-40, TDO/RF12RXA/PC7P1-50
0VGNDP1-51
+3V3+3.3 VP1-52
Table: Pin Assignments for the mPCIe Edge Connector. We provide A3053A assignments and RCM6700 assignments. Negative-true signals are prefixed by a forward slash.

The LAN8720A (U2) connections to the mPCIe (P1) contacts provide TX+, TX−, RX+, and RX− for 10/100 Ethernet. We also need ECOM, the Ethernet common-mode voltage. The RCM6700 provides 2.5 V for ECOM. The A3053A will provide 3.3 V. The LAN8720A works fine with a common-mode voltage equal to its supply voltage because its transmit and receive pins are AC-coupled within the chip. We assume that any RCM6700 motherboard will tolerate 3.3 V being driven in place of the 2.5 V that the RCM6700 provides for ECOM.

We consider whether we can program the PIC32MZ from an RCM6700 mother board using the mother board's 2×5 0.05" rectangular plug. We have the ICSP programming lines PGC and PGD routed to the rectangular plug. All we need is an adaptor from a two-row rectangular 0.05" receptacle to a one-row 0.1" plug.

PIC32MZ Signal mPCIe Pin 2×5 Header Pin RCM6700 Signal
MCLR165/RESET_IN
PGC447VBAT_EXT
PGD478STATUS
VDD524+3.3V
GND512GND
Table: ICSP Programming on an RCM6700 Mother Board.

In addition to the ICSP programming connections on the mPCIe connector, we also have all the pins necessary to create a JTAG programming interface on the mother board. These are TCK, TDI, TDO, and TMS. We can route these to a 2×5 0.1" rectangular plug for use with a Microchip JTAG programming cable. The table below gives the pinout of the JTAG plug that we might load on a motherboard designed for the A3053.

Pin Signal Notes
1VddTarget power
2GNDGround
3TCKJTAG Clock
4GNDGround
5TDIData In
6GNDGround
7TDOData Out
8GNDGround
9TMSMode Select
10GNDGround
Table: JTAG Programming on a Mother Board Designed for the A3053. The four JTAG signals are available on the mPCIe socket into which we plut the A3053. We route them to a 2×5 0.1" pitch rectangular plug on the mother board.

When our motherboard is designed for the A3053, we will load on it a 1×6 0.1" rectangular header for ICSP programming, using the standard Microchip programming pinout.

Pin Signal Notes
1/MCLRMicrocontroller Clear, Negative True
2VDDPositive Power Supply, +3.3 V
3GNDNegative Power Supply, 0.0 V
4PGDProgramming Data
5PGCProgramming Clock
6NCNo Connection
Table: ICSP Programming on a Mother Board Designed for the A3053. The three ICSP signals are available on the mPCIe socket into which we plug the A3053. We route them to a 1×6 0.1" pitch rectangular plug on the mother board.

We work our way through the LAN8720A configuration strap documentation. We want to set up our PHY with address zero, so we must pull down RXER with 12 kΩ, because this pin is the configuration strap for the PHY address. The MODE0-2 inputs we pull up to 3V3 so as to enable auto-negotiation and 10/100 Mbps. We pull down LED1 and LED2, which enables the internal 1.2V regulator and configures an interrupt we don't use. These pull-downs also make LET1 and LED2 active-HI. We add to the board a PO805 green LED for LED2, and we send LED1 off as LINK through the mPCIe. We can configure the behavior of these LED signals from the PIC32MZ during run-time. First version of the schematic, S3053A_1 drawn.

[12-AUG-25] We create an mPCIe template for KiCad and adjust its gold finger and corners in places by up to 100 μm in order to bring the dimensions and hole locations into exact agreement with the drawings. The finished template is mPCIe.zip. We begin the A305301A printed circuit board layout starting with the template.

[14-AUG-25] We concern ourselves with the distribution of our 50-MHz clock to three different logic inputs. It looks like we can do this with one trace of 11 mm and another of 24 mm. On the our ALT base board, we see reflections from an unterminated 1-m transmission line that are just enough to cause clock locking failure at 8 MHz. When we terminate with 47 Ω, the reflections vanish. The speed of propagation along the 7-mil track is about 200 m/μs, making the 8-MHz wavelength 25 m. The third harmonic of 8 MHz has wavelength 8 m, and one quarter of that is 2 m. We have problems when the line is one eighth of the wavelength of the third harmonic. In the case of 50-MHz, one eighth of the wavelength of the third harmonic will be 17 cm. Our 2.4-cm tracks are seven times smaller. We will route them and see what happens.


Figure: Drawing of the mCPIe Slot and Contacts. Taken from the mPCIe Specification.

We find that our existing mPCIe template has the contact pads 0.5 mm from the board edge, when the maximum should be 0.25 mm. The contact pads are 2.0 mm long when they should be 2.3 mm long. The beveled edges on the connector end of the board should cut right to the edge of the pads, so that the pads extend to the edge of bevel.


Figure: Drawing of the mPCIe Beveled Edge. Taken from the mPCIe Specification.

[18-AUG-25] First draft of A305301A layout complete and checked once. All components are on the top side. Identification is on the bottom silkscreen.

[21-AUG-25] We clear the solder mask on top and bottom side of the card edge connector. We submit for fabrication. We forget to update the version timestamp on the back side of the board, so it remains 20-AUG-25, despite changes to solder masks today.


Figure: Rendering of A305301A Printed Circuit Board. Left: top side. Right: bottom side.