10 years ago.

Ethernet Troubles custom PCB

Hi guys,

Like a lot of people on this forum, I am having a bit of trouble getting the Ethernet to work. I am using the DP83848C PHY.

The LPC1768 is flashed via flashmagic, I am also using a bin2hex converter which can convert files bigger than 64kB. Software wise I'm using the UDP echo server example, but with a static IP of 192.168.2.7 and the IP of my computer is 192.168.2.5 (using port 7).

#include "mbed.h"
#include "EthernetInterface.h"

DigitalOut led(LED1);
DigitalOut led2(LED2);
DigitalOut led3(LED3);

#define ECHO_SERVER_PORT   7

extern "C" void mbed_mac_address(char *mac){

    mac[0] = 0x00;
    mac[1] = 0x02;
    mac[2] = 0xF7;
    mac[3] = 0xF1;
    mac[4] = 0x91;
    mac[5] = 0x9F;
    };    
  


int main (void) {
    
  
   

    
    
    EthernetInterface eth;
     eth.init("192.168.2.7","255.255.255.0","192.168.2.5");
    eth.connect();
    led=1;
    
    UDPSocket server;
    server.bind(ECHO_SERVER_PORT);
    led2=1;
    

    
    Endpoint client;
    char buffer[256];
    
    while (true) {
        led3=1;
        int n = server.receiveFrom(client, buffer, sizeof(buffer));
        led=0;
        
        server.sendTo(client, buffer, n);
        led2=0;
        
        
        
      
    }
}


/media/uploads/WilliamCoventry/phycap.jpg

This is what i get as the output from wireshark for my custom board

/media/uploads/WilliamCoventry/mbedmac.jpg

this is what i get from the mbed module:

/media/uploads/WilliamCoventry/mbedwork.jpg

The code works fine on the mbed, just not on the custom board.

Any help would be great

EDIT: added code and schematic

Thanks

Will

Hi William can you put the schematic of the board youre using and the code?

Greetings

posted by Ney Palma 16 Apr 2014

Hi Ney, I've updated the question

posted by William Coventry 16 Apr 2014

1 Answer

10 years ago.

After some trawling through my previous posts / forums ..

http://mbed.org/forum/electronics/topic/3291/?page=3

right near the end .....

you need to use a different bin2hex program, to generate a working BIN file

Also in the posts, there is some potentially useful info about connections etc.

after all it was over two years ago (I barely remember what I did yesterday - nowadays)

Ceri

Hi Ceri, thanks for your reply.

I'm using the bin2hex converter mentioned in your tread. I think the problem may be something to do with the mac address. Do i need an external chip to store the mac address on?

Thanks

Will

posted by William Coventry 17 Apr 2014