Cannot connect to LPC2366 with FlashMagic-Ethernet

Started by deeaitch, April 09, 2009, 03:28:56 AM

Previous topic - Next topic

deeaitch

Hi!

I have downloded a Ethernet bootloader to my LPC2366 +National PHY. I know that the hardware works because I can run my app. on it.
After adapting the emac.h, sbl_config.h etc. I downloaded the code to flash 0x0000000 and run it.

I try to run a "Blank check" or simular in Flashmagic but it respond with "Unable to communicate" and I can see in my Ethernet sniffer that a '?<CR><LF>' was sent to the correct MAC address in a UPD frame.

I debug the bootloader and it seams as the code does receive characters, but they are not processed....(?)
What else do I have to think about when "porting" the code to my LPC2366?

An other thing I can see when debugging is that the row memcpy(HostMAC,FRAMEr->source,6); is never reached when trying to connect. I can see that the function same_mac() always return false because HostMAC[] is 0. In fact, when placing a breakpoint in the emac_getline() function, I can see that the emac har received the frame from the host. Is the Ethernet bootloader propery coded?

I use:
Rowley Crossworks
CrossConnect tool
LPC2366 running at 70MHz via PLL, XTAL = 20MHz. (I have setup the PLL correct, and the timer in timer.c runs well with the millisecond intervals).

Happy for answers!
/D

Andy Ayre

The ethernet bootloader works. I know this because I have used it myself. I tested it with an LPC2388 on a Keil MCB2300 v3.1 board.

In your ethernet sniffer is the MAC address AND the IP address correct? Once the bootloader receives the packet with the ?<CR><LF> it stores the MAC address and the IP address. After that it will only respond to packets where both those values are the same.

Do you have a diff file for what you changed in emac.h?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

deeaitch

Hi Andy!

Thank you fow answering. I have not changed the emac.h file, just deleted some definitions that already exists on the LPC2366.H file that I use. The definitions were the same.

One thing I had to change in emac.c was the alignment of the rxbuffer[], because the pointer txptr in void WriteFrame_EMAC(unsigned short Data) pointed at the wrong non-even address. Anyway, when I aligned the buffer, the pointer writes at the correct location. I guess this is a compiler issue.
I will check for simular problems and write you an update...

Happy Easter!
/D