Thank you again for your questions and notes. It's glad to know you can take time to help here.
Here my answers,
I have some further questions, and I would first like to confirm a few things with you if I may.Yes. Correct.
You were able to get 'good communication' with a Davicom AM-DM-9161 module connected to the SAM3X-EK development board using the sample code provided by Amtel, correct?
With the above test, the Davicom module was wired in place of the existing on-board DM-9161 PHY, yes?Yes. Correct.
And so far, this has been the only success with use of a PHY in any way, other than the on-board PHY of the SAM3X-EK, correct?Yes. Correct.
Thus, there has been no success as yet with a PHY connected to a Taijiuino or a Due, is this correct?Yes. Correct.
I believe the SAM3X-EK, the development board you have is using the 'beRTOS', is that correct?No. For this EMAC example, I am using some CMSIS thirdparty sources and SAM compiler drivers.
There is a couple of other EMAC samples that use FreeRTOS, a thirdparty API, but again, not for this current application.
I know nothing of this OS, other than to assume it is a Real Time multi thread capable Operating System?Yes. More specifically a mini Real-Time Kernel.
That being the case, any porting from an OS based system to a no OS based system such as used on Arduino is going to need some careful attention to detail for a successful porting.It is not the current case.
Thanks for your generous offer, I can understand your keenness also, though I'm not sure that having the PHY chips right at this moment will help us.
What would help would be if I had my hands on a Taijiuino and a PHY module.
I would then be in a better position to assist Palliser with the porting and testing, more hands or brains on deck would certainly help.
I might need to go out and buy those things, but am hesitant as I would have little use for them afterwards, and it will just be another board collecting dust. If anyone wants to donate one on a temporary basis, that would be great, I'll pay postage Yes ODwyerPW. Thank you also for you interest and offering. So far, I am covered with my Taijiuino and PHY. If I need something, I will let you know.
There is no way to get any communication between them. I have double-checked the wiring, pull-up/down resistors, and I even ran a simple code that blinked all the Ethernet pins in the SAM3X8ERight, no indication of any communication between them.
I take it you meant there was no indication of any communication between them, rather than 'there is no way to get..'
When you did the test to toggle the EMAC IO lines on the chip, did that succeed?Yes. I made all the EMAC pins to blink accordingly.
If you were able to do that, then my first suggestion to you is that you would appear to have those IO lines set for GPIO use rather than having them set to what I believe should be, to use peripheral 'A', the EMAC function.Interesting. Yes. For that specific ‘blink’ test I did set the Emac I/O lines for GPIO use.
For that test, maybe you configured those pins for GPIO use?
Did you then configure those pins for peripheral use to continue with EMAC?Not sure now. I will verify that.
I think it will be important for you to make sure you are setting up the peripheral the correct way and to confirm that you can read and write various EMAC registers initially. Check section 42.6 of the main SAM3X pdf for Ethernet MAC 10/100 (EMAC) User Interface Register Mapping at table 42-6.I will do that as soon as possible. Thanks.
Make a test code that goes ahead and configures the EMAC and then have it read back those registers and display them in a way you can see the values, maybe even a Serial.print might be good.I will do that also as soon as possible. Thanks.
Also, from you photo at reply #43 it appears to me you are attempting the test in MII mode rather than what I would assume to be an easier mode of RMII. In your software I see you have mii.h, do you also have a rmii.h to work with for RMII later?No. Remember that for MII you need: carrier sense (ECRS), collision detect (ECOL), receive clock (ERXCK) and transmit error (ETXER) pins. I have not use any of those phys pins in my tests. For a better understanding, please, see my schematics on reply #29 and read page 2 of doc11153. Regarding rmii.h, even though I am not using it, I wanted to keep it for further use.
Wilfredo, with a 25Mhz MII or 50Mhz RMII clock, all wires need to be very short, otherwise I expect you'll have a lot of problems getting it to work. See if it is possible for you to mount the PHY module directly on top of the Taijiuino with wires no longer than 50mm.Again, so far I have been using RMII, with less pins as you said.
I will consider that in my next tests. Thanks.
Later on I would suggest using RMII as it uses fewer of IO pins of the SAM3X and that the interface to the PHY should be simpler, in terms of both hardware and also PHY register configuration.
Can you check that none of the additional lines used for MII over RMII are not used by other functions of the DUE or Taijiuino as they will need to be free for EMAC?I checked them and all the Taijiuino EMAC lines are free for EMAC.
But for now, make sure you configure the EMAC interface to match your PHY, whether that be MII or RMII.I will consider that in my next tests. Thanks.
At this point my suggestion would be to focus on using the Taijiuino and to know that you are accessing the internal EMAC interface correctly. Once this has been achieved and proven, we can connect up a PHY.I will consider that also in my next tests. Thanks.
As stated in the Atmel 11153.pdf, 'How to connect an Ethernet PHY to SAM3X' documentation; Like you, I hope and believe that any RMII PHY transceiver should make it with SAM3X8E/EMAC. Yes. I believe Micrel should be my next phy choice.
'Due to standardization, the connection between a MAC controller and a PHY is straightforward and simple. Even, any PHY can work with any MAC'
I would hope that to be the case, and with that I am pretty keen to develop with Micrel's KSZ8081RNA, though let's get what we have now going first, in terms of PHY chip.
Again, thank you Paul and Rob for your interest. I will keep you posted about my progress here.
Regards and Happy Easter!