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.
Revision 13:409b1b671df2, committed 2014-05-23
- Comitter:
- mbed_official
- Date:
- Fri May 23 05:45:26 2014 +0100
- Parent:
- 12:8722e4b223d8
- Child:
- 14:578727b0a909
- Commit message:
- Synchronized with git revision 62605dfaaae938eb02efb183021248270793666b
Full URL: https://github.com/mbedmicro/mbed/commit/62605dfaaae938eb02efb183021248270793666b/
Signed-off-by: Sergio Scaglia <sergio.scaglia@arm.com>
Changed in this revision
arch/TARGET_K64F/fsl_enet_driver.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/arch/TARGET_K64F/fsl_enet_driver.c Wed May 21 23:15:24 2014 +0100 +++ b/arch/TARGET_K64F/fsl_enet_driver.c Fri May 23 05:45:26 2014 +0100 @@ -264,6 +264,13 @@ { return kStatus_ENET_InvalidInput; } + + /* Initialize values that will not be initialized later on */ + rxFifo.rxEmpty = 0; + rxFifo.rxFull = 0; + txFifo.isStoreForwardEnabled = 0; + txFifo.txFifoWrite = 0; + txFifo.txEmpty = 0; /* Configure tx/rx accelerator*/ if (enetIfPtr->macCfgPtr->isRxAccelEnabled) @@ -290,6 +297,16 @@ txFifo.isStoreForwardEnabled = 1; } + + /* Set TFWR value if STRFWD is not being used */ + if (txFifo.isStoreForwardEnabled == 1) + txFifo.txFifoWrite = 0; + else + /* TFWR value is a trade-off between transmit latency and risk of transmit FIFO underrun due to contention for the system bus + TFWR = 15 means transmission will begin once 960 bytes has been written to the Tx FIFO (for frames larger than 960 bytes) + See Section 45.4.18 - Transmit FIFO Watermark Register of the K64F Reference Manual for details */ + txFifo.txFifoWrite = 15; + /* Configure tx/rx FIFO with default value*/ rxFifo.rxAlmostEmpty = 4; rxFifo.rxAlmostFull = 4;