Request for improvment in lpc17xx_40xx_emac.c

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Request for improvment in lpc17xx_40xx_emac.c

240 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by robekras on Fri Mar 07 02:59:21 MST 2014
In lwip exists a #define ETH_PAD_SIZE 0

This is meant for making the frames 32-bit aligned (as the ethernet header is only 14 bytes long) when this define is set to 2.
The main reason is for speeding up, but there can also be another issue in some cases, which needs a workaround than.

We have frames with 32-bit values which are passed as parameters to a function. The compiler now generates code where for the first three 32-bit values assembler commands are used which can also handle 16-bit aligned valued, but for some additional (let's say three) parameters assember code is used, which require 32-bit aligned values.

For me it seems that the lpc17xx_40xx_emac.c needs some modification to handle the ETH_PAD_SIZE correctly, but
unfortunatelly I didn't find the correct locations to incorporate the ETH_PAD_SIZE into lpc17xx_40xx_emac.c

Robert
Labels (1)
0 Kudos
0 Replies