Show Posts
Pages: [1]
1  Products / Arduino Due / Re: Connecting an Ethernet PHY to Arduino Due on: December 02, 2013, 05:43:45 pm
Cheers! your pin out diagrams feature on my wall art!
2  Products / Arduino Due / Re: Connecting an Ethernet PHY to Arduino Due on: December 02, 2013, 05:19:20 pm
Hi Palliser and all the rest interested in utilising the EMAC built in to the SAM3X8E

Let me introduce the Duet:



Its a 3D Printer (or other stepper driven robot) controller board that uses the SAM3X8E, along with its onboard EMAC,  HSMCI SD 2.0 interface and other peripherals. Alot more info is available on this blog post:

http://blog.think3dprint3d.com/2013/12/Duet-Arduino-Due-compatible-3DPrinter-controller.html

It uses the KSZ8051RNL PHY, I wrote about this initial work back in post #72: (http://forum.arduino.cc/index.php?topic=142908.msg1201468#msg1201468). The firmware is linked from the blog and runs a web server to control the 3D Printer. Thanks for all the work by Pallister and all the other contributors to this forum  - it was useful to see the other implementations.
3  Products / Arduino Due / Re: [Finally a working EMAC library] Connecting an Ethernet PHY to Arduino Due on: April 16, 2013, 01:49:04 pm
I agree that we will end up having a number of different Phy drivers to incorporate within an overall "Due Ethernet" library. The SAM3X-EK example that I modified has ARM(CMSIS), ATMEL(ASF) and LwIP code. It might be better to look at a LwIP or another stack without all the rest and see if its possible to add Due support, we would then benefit from further developments of the LwIP stack, rather than a Arduino specific library that once working may not be further developed.

Thoughts?
4  Products / Arduino Due / Re: [Finally a working EMAC library] Connecting an Ethernet PHY to Arduino Due on: April 14, 2013, 07:14:08 pm
An update

I had set the debug output on and defined in cc.h:
Code:
#define LWIP_PLATFORM_DIAG(x)   do { printf x; } while(0)
#define LWIP_PLATFORM_ASSERT(x) do { printf("Assertion \"%s\" failed at line %d in %s\n", x, __LINE__, __FILE__); \
                                 fflush(NULL); abort(); }while(0)

From here: http://lwip.wikia.com/wiki/Porting_For_Bare_Metal
This did not compile so (due to three incorrectly defined debug lines in ethernetif.h, but i did not realise that at the time) so I changed the line above by adding a bracket:
Code:
#define LWIP_PLATFORM_DIAG(x)   do { printf (x); } while(0)
fatal mistake!

Now everything compiled so I wrote the PHY driver but could not make anything work - it was hanging on loads of debugs. Remove the brackets and fix the faulty lines in ethernetif.h and voila - LwIP working with the KSZ8051RNL

I have attached the phy driver files for reference, they are not fully tested but should help if you have one of these PHYs.
5  Products / Arduino Due / Re: [Finally a working EMAC library] Connecting an Ethernet PHY to Arduino Due on: April 14, 2013, 09:37:03 am
Hey All

Having finally received a custom prototype board and I am working though getting a SAM3X8E interfaced with the KSZ8051RNL PHY (similar but slightly older to the KSZ8081 mentioned above). I am using the LWIP example with the Atmel ASF for the SAM3X-EK board and have rewritten the PHY driver for the KSZ8051RNL from the original DM9161A PHY.

So far I have managed to get the MDIO interface up and I can read and write to the PHY registers. Auto Negotiation works as does disabling and enabling various PHY features. However I cannot get any further - I have enabled debug (output to UART) and stats (no output from them yet) but I can't find out why the stack is not responding to ICMP, let alone any other protocols. Actually it does not even respond to an ARP request (I have wireshark monitoring the interface).

As you (especially Palliser) have seen the implementation within the SAM3X-EK ASF example is rather large - running to 200+ files. Any chance I could get a copy of the "working so far" code you have written Palliser? I know it was posted but you have taken it down and I did not get a copy.

I will keep plugging away in the meantime.

Cheers Tony
6  Products / Arduino Due / Re: Connecting an Ethernet PHY to Arduino Due on: March 13, 2013, 02:13:43 pm
Hey Palliser, how are you getting on with interfacing your phy to the Due? I don't mean to chase you but I am keen to see the library/ethernet files as I would like to add support for a different PHY.
7  Products / Arduino Due / Re: Connecting an Ethernet PHY to Arduino Due on: February 06, 2013, 12:31:48 pm
Hello gaplee and good catch with the TaijiDUE.
Can anybody post a picture showing the Eth terminal? Thanks.

OK. I have good news!. I just ported the Atmel Ethernet API to Arduino IDE. At least the 'EMAC_EMAC_EXAMPLE1' now called 'Arduino_Due_EMAC_Sample_1.ino' is compiling with no errors. My next step now is try to simplify as much as possible the library (34 files) and then wait for my shield to be ready for preliminary tests before upload it to github. Yes!

Hey Palliser - any chance you can share the code for example you have - I am working with a KSZ8051RNL which I had working on LPC1789 and want to port to the SAM3X8E.

Cheers
Pages: [1]