Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: arch/TARGET_K64F/k64f_emac.c
- Revision:
- 16:eb4a98a54ad0
- Parent:
- 15:82aaaa2f4d5c
diff -r 82aaaa2f4d5c -r eb4a98a54ad0 arch/TARGET_K64F/k64f_emac.c
--- 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;