Ethernet Communication via TJA1101

cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet Communication via TJA1101

176 Views
Contributor I

Hi,

I'm trying to read some frames with S32K148 EVB (176 pins) coming from an Arduino board via media converter and TJA1101 daughter card. The demo application PHY TJA1101 in the SDK doesn't work as described in the application notes of the demo. The pre-integration of TJA110x driver is done as described in ADTJA1101-RMII User Guide. The Processor Expert Code is generated before flashing the MCU. After flashing, the described functionality couldn't be seen (neither for BTN0 nor for BTN1). Any color change couldn't be observed on the RGB LED, it always has red color as it has a red color by default i.e. buttons don't change its color as described in the example application's webpage.

12V power supply is used with jumper configurations J18:1-2, J7:2-3 and J8:1-2. Any help would be appreciated!

Cheers,

Ozan

0 Kudos
8 Replies

146 Views
NXP TechSupport
NXP TechSupport

Hello @ozancs,

I will suggest using the latest IDE and SDK (S32DS 3.3 and RTM 4.0.0) this has an example called phy_tja1101_s32k148 that should work for this setup. The documentation to run this example is in the following path:

S32DS.3.3/S32DS/software/S32SDK_S32K1XX_RTM_4.0.0/doc/html_S32K148/phy_tja1101_s32k148_group.html

I'm not sure how this media converter works but I will suggest using the loopback mode to test if it's working as expected.

Best Regards,

Alexis Andalon

0 Kudos

136 Views
Contributor I

Hi @Alexis_A,

I downloaded and installed the latest IDE and the SDK update on top of it, but I can't flash the MCU for some reason. During the installation, I followed the installation guide provided by NXP and simply applied default configurations. However I can't see any button called Flash or something similar neither under the Run tab nor at the quick access menu/bar. You can see the screenshot below.

ozancs_0-1601550094861.png

I can still flash with the old IDE (S32DS ARM 2018 R1) though, as given in the screenshot below.

ozancs_1-1601550191280.png

What can the issue be here?

Also it would be very great if you can share some code examples (that shows how to read specific bits of a received frame via the daughter card I've specified) with me.

Thanks in advance,

Ozan

0 Kudos

123 Views
NXP TechSupport
NXP TechSupport

Hello @ozancs,

Usually, the RUN button is used to the only flash download option in the IDE but unfortunately, this is only available for J-Link debuggers.

Also, the example code in the SDK that I previously mentioned should help you to receive a frame, after that could only mask the message.

Best Regards,

Alexis Andalon

0 Kudos

98 Views
Contributor I

Hello @Alexis_A,

It doesn't work with the Run option that you've mentioned. I get the message below.

ozancs_0-1601967657644.png

All the connections for the board are done as described in the example's tutorial page. What could the reason of this error be?

When using the daughter card, I don't know if I should use PHY_Read() or ENET_DRV_ReadFrame(). I will get the data from an Arduino board via Ethernet but the connection between the media converter and the daughter card is done by twisted pair cabels.

Cheers,

Ozan

0 Kudos

87 Views
NXP TechSupport
NXP TechSupport

Hello @ozancs,

Usually, the S32K148-EVB uses the PEMicro debugger firmware by default. So try launching this debug session.

The best one will be ENET_DRV_ReadFrame since the PHY_Read is to read specific registers from the PHY.

Best Regards,

Alexis Andalon

0 Kudos

61 Views
Contributor I

Hi @Alexis_A,

PEMicro Debugging doesn't give errors when launched. However, I still see only the red color at the LED. I've pressed and held both buttons at each line of thw while loop in the demo app. The color should change after the line PHY_Read() but nothing happens.

I also see a red LED turned on on the daughter card, from that I assume it's not a hardware issue at the daughter card?

What else can the issue be here?

Cheers,

Ozan

0 Kudos

52 Views
NXP TechSupport
NXP TechSupport

Hello @ozancs ,

Did you try to use the loopback feature to test if the module is working as expected? Only to identify if this is a hardware or software problem.

Best Regards,
Alexis Andalon

0 Kudos

40 Views
Contributor I

Hello @Alexis_A,

I've tried debugging the enet_loopback demo with both SDKs (the one I used to use and the one you've told) and it shows the expected behavior in both cases (however the color of the LED doesn't change when I flash the code into the MCU and not start a debug session).

I've made some other tests (helloworld and Iseled tests) when I received the EVB at the first place and they both worked as expected. So I don't think that the issue is related to the MCU or EVB here, but not sure about the daughter card or the ethernet interface of the EVB.

Since you recommended me to use ENET_DRV_ReadFrame() function, I changed the code for demo application PHY TJA1101 as I need to configure the daughter card and I can only see those component options with the phy demo. You can find the code attached to this reply. My purpose with this code is to see the LED with blue color when the EVB receives a frame. But when I debugged this code, I've seen that the status variable within the function rx_callback() doesn't have the value STATUS_SUCCESS, instead it always has the value STATUS_ENET_RX_QUEUE_EMPTY which shows that I can't receive the frames properly. I'm not sure if the code is rock solid for that purpose but I believe the frames don't go through the daughter card. Please let me know if I'm wrong and have a mistake within the code.

Cheers,

Ozan

0 Kudos