S32K344 - TJA1101 PHY Driver (ADTJA1101-RMII)

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K344 - TJA1101 PHY Driver (ADTJA1101-RMII)

243 Views
jabran
Contributor II

Hello,

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.

Thanks!

0 Kudos
15 Replies

160 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @jabran,

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.

Best Regards,

Nam

0 Kudos

154 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @jabran,

I have sent you an email about the sample application. Please check it and for any further request, please let me know.

Best Regards,

Nam

0 Kudos

142 Views
jabran
Contributor II

Hey Nam,

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.

Phone: 562-508-5894

Thanks for your help Nam!

0 Kudos

133 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @jabran,

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.

Best Regards,

Nam

0 Kudos

127 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @jabran,

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. 

Best Regards,

Nam 

0 Kudos

121 Views
jabran
Contributor II

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.

0 Kudos

105 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @jabran,

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:

eth-frame-llc.PNG

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.

Best Regards,

Nam

0 Kudos

86 Views
jabran
Contributor II

Hey Nam,

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.

0 Kudos

75 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @jabran,

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.

Best Regards,

Nam 

0 Kudos

65 Views
jabran
Contributor II

Yeah I have configured my side the same. My media converter is configured as SLAVE and ETH PHY is configured as MASTER.

Also I verified TPAD12 has 50 MHz REF_CLK on it (measured through oscilloscope).

As far as power supply is concerned, I am connecting the board with 12V adapter and ethernet jumper J675 is powering the ethernet adapter with 3V3. I added that code snippet from the link you sent me to make it work with 3V3 but still can't see packets on PC unfortunately.

0 Kudos

80 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @jabran,

Are you familiar with Microsoft Teams? I can send you an invitation. Otherwise please recommend preferred meeting environment. 

In which timeslot you're available? I'm available from 9:30AM to 12:00AM and from 1:30PM to 6:00PM ICT (GMT +7).

What's your email address?

Best Regards,

Nam

0 Kudos

53 Views
jabran
Contributor II

Project files attached (as requested in the meeting today).

Tags (1)
0 Kudos

70 Views
jabran
Contributor II

Hey Nam,

Yes I have Microsoft teams. My email is jabran@atlismotorvehicles.com

We can setup a meeting for Friday at 10:30 AM your time (ICT). I will be online to take the meeting and debug this issue with you.

I am available any time (24/7). Just need this issue resolved

Let me know if that time slot doesn't work for you. Book anything for Friday and I will be online.

Thanks for your help!

0 Kudos

193 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @jabran,

We have a EthTrcv_43_PHY package, which is an upper layer of Eth/Gmac for PHY configuration and APIs. The package supports TJA1101, and can be used on top of RTD for K3. Unfortunately, the package is in early stage and hasn't supported S32DS yet. We are planning to add the S32DS support in the BETA release, which will come in this August.

At the moment, we can support you with implement Eth/Gmac driver to communicate with TJA1101. The Eth/Gmac drivers has supported MDIO/MMD write/read commands to communicate with TJA1101, however we need to build from scratches.

Please let me know your idea.

Best Regards,

Nam

0 Kudos

183 Views
jabran
Contributor II

Thanks for quick response.

We will take whatever you have for now to get TJA1101 working for testing purpose. Can we have a sample project for S32DS after you guys have configured it to work with TJA1101 through MDIO?

How long do you think it would take you guys to come up with MDIO solution to communicate with TJA1101?

Thanks for your help.

0 Kudos