lpcware

Request for improvment in lpc17xx_40xx_emac.c

Discussion created by lpcware Employee on Jun 15, 2016
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

Outcomes