Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 7 months 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; } }
This is what i get as the output from wireshark for my custom board
this is what i get from the mbed module:
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
1 Answer
10 years, 7 months 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 William can you put the schematic of the board youre using and the code?
Greetings
posted by Ney Palma 16 Apr 2014Hi Ney, I've updated the question
posted by William Coventry 16 Apr 2014