Keil Logo


Information in this article applies to:

  • MCB2300 Evaluation Board
  • NXP LPC2300 Devices
  • Real-Time Library (RL-ARM) Version 3.10


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).

  • LPC23xx/LPC2468 Rev '-' parts have the Ethernet.1 problem and the above mentioned workaround is implemented in the Ethernet driver of the Real-Time Library.
  • LPC23xx/LPC2468 Rev 'A' parts have the Ethernet.1 problem fixed, but now the workaround for Rev '-' is causing problems on Rev 'A'. To use the Ethernet interface in RMII mode on Rev 'A', the software now must NOT write a 1 to bit 12 (P1.6) in the PINSEL2 register.

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;


  • NXP LPC2364/66/68/78 User's Manual
  • NXP LPC2364/66/68/78 Errata Sheet



The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Wednesday, September 5, 2007

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.