ARM Technical Support Knowledge Articles


Applies to: MCB2300 Evaluation Board


Information in this article applies to:


I have sucessfully used the Ethernet interface on the LPC2378 devices with the Real-Time Library. Now we have got new A-Step devices and the Ethernet interface seems to fail.

Is this a known issue?


In the first revisions of the LPC2364/66/68/78 or LPC2468 devices, there was a bug called Ethernet.1 described in the current LPC23xx/LPC2468 Errata Sheets as follows:

Ethernet.1: Setting up the Ethernet interface in RMII mode.

Introduction: The LPC2378 has an Ethernet interface, which can be interface with an off-chip PHY using the RMII interface only. The MII interface is not supported on this device.

Problem: The default configuration of the device does not enable the RMII interface.

Workaround: To use the Ethernet interface in RMII mode write a 1 to bit 12 in PINSEL2 register (located at 0xE002C008).

To support both Rev '-' and Rev 'A' devices in the same driver interface, the MAC module ID bit can be used to identify the part and determine if bit 12 in PINSEL2 register needs to be set or not.

The steps to initialize the MAC based on the module ID are shown below. The code is part of the Real-Time Library driver file LPC23_EMAC.C:

  1. In the header file lpc23xx.h, make sure Module ID is defined.
    #define MAC_BASE_ADDR 0xFFE00000
    #define MAC_MODULEID (*(volatile unsigned long *)(MAC_BASE_ADDR + 0xFFC)) /* Module ID reg (RO) */


    • The MAC_MODULEID register is not documented in the User's Manual.
  2. In the beginning of the MAC initialization file, add below definition:
    #define OLD_EMAC_MODULE_ID ((0x3902 << 16) | 0x2000)


    • The OLD_MAC_MODULEID register is not documented in the User's Manual.
  3. In MAC initialization routine, right after setting the EMAC clock in the PCONP register, check for the MAC_MODULEID and perform the correct setup as shown below:
    void init_ethernet (void) {
       /* Initialize the EMAC ethernet controller. */
       U32 regv,tout,id1,id2;
       /* Power Up the EMAC controller. */
       PCONP |= 0x40000000;
       /* Enable P1 Ethernet Pins. */
          /* For the first silicon rev.'-' ID P1.6 should be set. */
          PINSEL2 = 0x50151105;
       else {
          /* on rev. 'A' and later, P1.6 should NOT be set. */
          PINSEL2 = 0x50150105;




Request the files attached to this knowledgebase article.

Article last edited on: 2007-09-05 01:08:26

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential