EmbeddedRelated.com
Forums

Micrel PHY & LPC2366 Rev 'B'

Started by miodragsm October 30, 2008
Hi

Does anyone use LPC2366 Rev 'B' and Micrel KS8721BL/SL PHY? I would
need some sample code to test if I have problems with my custom built
PCB or if I missed something while porting the FreeRTOS 2368 demo to
my board. I have changed flash size in linker script to 244K (why does
FreeRTOS demo declare 12K less flash that lpc has?), changed PHY ID
for Micrel PHY and set IP address for my board to address appropriate
for my LAN. Using debugger I confirmed that PHY is recognised
correctly and that uIP task starts running, but I can't ping my board,
or open http server page.

I did test my board without FreeRTOS with ported code from NXP LPC23XX
bundle (EMAC test) and my board runs correctly when TX_ONLY mode is
set, but doesn't work in RX_BOUNCE mode (it never gets any package...).

Can anyone help?

An Engineer's Guide to the LPC2100 Series

Hi,

> Does anyone use LPC2366 Rev 'B' and Micrel KS8721BL/SL PHY? I would
> need some sample code to test if I have problems with my custom built
> PCB or if I missed something while porting the FreeRTOS 2368 demo to
> my board. I have changed flash size in linker script to 244K (why does
> FreeRTOS demo declare 12K less flash that lpc has?), changed PHY ID
> for Micrel PHY and set IP address for my board to address appropriate
> for my LAN. Using debugger I confirmed that PHY is recognised
> correctly and that uIP task starts running, but I can't ping my board,
> or open http server page.

The DP83848 and KS8721BL/SL are not register compatible. Mostly compatible
when reading state and data sheets, but not compatible in general use. Just
changing the PHY ID in the code doesn't mean that the resulting code will
work...

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

--- In l..., "Paul Curtis" wrote:
>
> Hi,
>
> > Does anyone use LPC2366 Rev 'B' and Micrel KS8721BL/SL PHY? I would
> > need some sample code to test if I have problems with my custom built
> > PCB or if I missed something while porting the FreeRTOS 2368 demo to
> > my board. I have changed flash size in linker script to 244K (why does
> > FreeRTOS demo declare 12K less flash that lpc has?), changed PHY ID
> > for Micrel PHY and set IP address for my board to address appropriate
> > for my LAN. Using debugger I confirmed that PHY is recognised
> > correctly and that uIP task starts running, but I can't ping my board,
> > or open http server page.
>
> The DP83848 and KS8721BL/SL are not register compatible. Mostly
compatible
> when reading state and data sheets, but not compatible in general
use. Just
> changing the PHY ID in the code doesn't mean that the resulting code
will
> work...
>
> --
> Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
>

Well yes, but emac.c code in NXP bundle supports both PHY, and apart
from different PHY ID, only code that I can see that is chip specific
is the part with auto negotiation at the end of PHYInit function...

--- In l..., "miodragsm" wrote:
>
> --- In l..., "Paul Curtis" wrote:
> >
> > Hi,
> >
> > > Does anyone use LPC2366 Rev 'B' and Micrel KS8721BL/SL PHY? I would
> > > need some sample code to test if I have problems with my custom
built
> > > PCB or if I missed something while porting the FreeRTOS 2368 demo to
> > > my board. I have changed flash size in linker script to 244K
(why does
> > > FreeRTOS demo declare 12K less flash that lpc has?), changed PHY ID
> > > for Micrel PHY and set IP address for my board to address
appropriate
> > > for my LAN. Using debugger I confirmed that PHY is recognised
> > > correctly and that uIP task starts running, but I can't ping my
board,
> > > or open http server page.
> >
> > The DP83848 and KS8721BL/SL are not register compatible. Mostly
> compatible
> > when reading state and data sheets, but not compatible in general
> use. Just
> > changing the PHY ID in the code doesn't mean that the resulting code
> will
> > work...
> >
> > --
> > Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> > CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
> > Well yes, but emac.c code in NXP bundle supports both PHY, and apart
> from different PHY ID, only code that I can see that is chip specific
> is the part with auto negotiation at the end of PHYInit function...
>

Well, after some more code adjusting I got ARP to work, and IP (ICMP)
is (almost) working... the thing is that packages are transmitted
correctly, but are received with errors. Mostly package lengths are
incorrect (additional dummy bytes are appended to the packages), or
some of the bytes in message are corrupted. As far as I can see, this
always happens near the end of package. Did someone have this kind of
problems? At this point I am not sure if there is problem with PCB or
if I am missing something...