I am trying to run Ethernet WITHOUT Loopback mode using a Transceiver adapter (ADTJA1101-RMII) on S32K344 Eval Board.
There are two examples provided with S32K3xx development package for this. One uses Gmac_1 RTD solution (Example 1 - xxxxx_DS_01) and the other uses traditional AUTOSAR solution using Eth, Eth_If, EthTrcv combined into GMAC (Example 2 - xxxxxx_DS_02).
The problem is that PHY driver is not provided in S32K3xx development package therefore I am unable to configure ADTJA1101-RMII through S32 Design Studio.
ADTJA1101-RMII is connected through SABRE connector on S32K148 board and works fine but when connected to S32K344 board it doesn't have any configurable drivers in S32 Design Studio.
If you guys have any Ethernet PHY solution/example for S32K344, please help. ADTJA1101-RMII should be compatible with S32K344 using SABRE connection, but if it is not, please provide a list of ETH PHY I can use with this board.
I can try to create a sample application in S32DS, which demonstrates the communication between GMAC on K3 and TJA1101, through MDIO. The demo would be: TJA1101 works in loopback mode, and response to the signal sending from the GMAC on K3. I will let you know once I've finished it. It could take 2-3 days.
We are very close to a solution here. The example you provided works fine in "loopback mode" but when I take it out of loopback mode, ETH packet is not seen on the laptop. Link is up, activity light flashes when ETH transmit is put in a while loop but nothing is received on the laptop for some reason.
I am guessing the problem is in the way FCS (Frame Check Sequence) is setup? I have tried directly connecting to the laptop and through a switch, in both cases I see the LED blinking continuously as PHY keeps transmitting ETH packet but I cannot see it on laptop. I can see those packets from S32K1xx Ethernet board so I am sure laptop connection setup is fine.
If you have 10 minutes and can give me a call on my cellphone I can explain the issue in detail if the above message is not clear. This will avoid a lot of back and forth.
Thanks for your help Nam!
I think I have understood your problem. I also have the same issue when I was trying to send the signal outside the PHY, as I couldn't catch the signal by my PC. However, I was successfully with another PHY, so I guess I need to do more with the TJA1101 configuration to make it works. I will let you know ASAP.
Finally I have successfully connected the K3-TJA1101 to PC via a media converter, and I can see my sending signal appeared in Wireshark capturing... Please see my update in the ticket portal (the same link to get the sample application)
The point is, even the pin strapping is RMII, my TJA1101 board is configured as MII, so I need to manually write to the MII_MODE in Configuration register 1 (register 18). You will see that snippet code when you check the function TJA1101_SetRmiiMode() in my sample application.
I am running this example straight out of the box and I see the same problem on my end as of now. LED for activity on my media converter keeps blinking but I don't see any packets on my PC.
I am trying to see if there are some things I have to set on my media converter to get it to work since it is configurable. I am currently using a Microchip media converter (https://www.microchip.com/developmenttools/ProductDetails/EV02N47A).
I have previously been able to use this media converter and see ethernet packets coming out of S32K148 on my PC.
My link shows up and Activity light is blinking both on the switch and media converter. I have tried the setup with and without the switch to eliminate the possibility of switch dropping the packets.
Also I have tried the same setup on two different PCs to eliminate the possibility of my PC dropping these frames.
Which media converter are you using?
Attaching a video with this message to show my setup and activity LED blinking.
Also which Ethernet adapter are you using on your side? I am using ADTJA1101-RMII.
I'm using XADTJA1101-RMII (prototype version of ADTJA1101-RMII) and EASYCON BroadR-Reach Media Converter from GOPEL. The media converter is configured as a SLAVE. I'm using Wireshark to capture the frame, and it looks like:
Here are some points that might be related to your issue:
- Try to reverse the two-wires connection from TJA1101 to media converter.
- Enable promiscuous mode for all interface, due to the fact that they are dummy frames.
- Measure the REF_CLK for both , it should be 50MHz after calling TJA1101_SetRmiiMode(). If you're using S32K3XXEVB-Q257, you can measure TPAD12.
If these things are not helped, then we can setup a call for remotely check.
I have tried those three points you mentioned and I still cannot see Ethernet packets on my PC. Can we setup a remote session to debug this together?
Also which board are you using for S32K344 on your side? I am using S32K3X4EVB-Q257
Thanks for your help with this issue.
I'm using a different board (the evaluation version), but there should be no differences in Ethernet connection/pins, as I've cross checked between the validation board and the S32K3X4EVB-Q257.
One more point can be checked is the master/slave of PHYs, in my demo I'm configuring the TJA1101 as master, so the media interface card should be configured as slave.
Another reason is probably from the power supply, see this topic: https://community.nxp.com/t5/S32K/S32K148EVB-ADTJA1101-RMII/m-p/802218 In my demo, 3.3V was used.