NXP LPC1768 Ethernet driver for lwip and CMSIS-RTOS

Dependents:   EthernetInterface EthernetInterface EthernetInterface_RSF EthernetInterface ... more

Legacy Networking Libraries

This is an mbed 2 networking library. For mbed 5, the networking libraries have been revised to better support additional network stacks and thread safety here.

This library is based on the code of the NXP LPC port of the Lightweight TCP/IP Stack

Copyright(C) 2011, NXP Semiconductor
All rights reserved.

Software that is described herein is for illustrative purposes only
which provides customers with programming information regarding the
products. This software is supplied "AS IS" without any warranties.
NXP Semiconductors assumes no responsibility or liability for the
use of the software, conveys no license or title under any patent,
copyright, or mask work right to the product. NXP Semiconductors
reserves the right to make changes in the software without
notification. NXP Semiconductors also make no representation or
warranty that such application will be suitable for the specified
use without further testing or modification.

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Wed Jul 30 16:15:16 2014 +0100
Parent:
15:82aaaa2f4d5c
Child:
17:eb2c8c3aa1cd
Commit message:
Synchronized with git revision 48daa3c4a5e54de413ad58e5bc64d67074cf9f97

Full URL: https://github.com/mbedmicro/mbed/commit/48daa3c4a5e54de413ad58e5bc64d67074cf9f97/

Changed in this revision

arch/TARGET_K64F/k64f_emac.c Show annotated file Show diff for this revision Revisions of this file
--- a/arch/TARGET_K64F/k64f_emac.c	Wed Jun 11 09:30:25 2014 +0100
+++ b/arch/TARGET_K64F/k64f_emac.c	Wed Jul 30 16:15:16 2014 +0100
@@ -271,8 +271,7 @@
 
   // Traverse all descriptors, looking for the ones modified by the uDMA
   i = k64f_enet->tx_consume_index;
-  while(i != k64f_enet->tx_produce_index) {
-    if (bdPtr[i].controlExtend2 & TX_DESC_UPDATED_MASK) { // descriptor updated by uDMA
+  while(i != k64f_enet->tx_produce_index && !(bdPtr[i].control & kEnetTxBdReady)) {
       if (k64f_enet->txb_aligned[i]) {
         free(k64f_enet->txb_aligned[i]);
         k64f_enet->txb_aligned[i] = NULL;
@@ -282,8 +281,7 @@
       }
       osSemaphoreRelease(k64f_enet->xTXDCountSem.id);
       bdPtr[i].controlExtend2 &= ~TX_DESC_UPDATED_MASK;
-    }
-    i = (i + 1) % ENET_TX_RING_LEN;
+      i = (i + 1) % ENET_TX_RING_LEN;
   }
   k64f_enet->tx_consume_index = i;