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
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
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.
I can still flash with the old IDE (S32DS ARM 2018 R1) though, as given in the screenshot below.
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
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
Hello @Alexis_A,
It doesn't work with the Run option that you've mentioned. I get the message below.
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
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
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
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
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
Hi @Alexis_A,
In addition to my reply above, I've tried probing the pins of TJA1101. To see if the changes on those pins(signals) are relevant with the signals coming from the Ardiuno chip or not, so I powered on and off the Ardiuno to see any changes at TJA1101's pins. I'm afraid unplugging Ardiuno has zero effect on the signals on TJA1101's pins. I don't know what those pins are supposed to do (NXP hasn't approved my NDA request yet, I can't access the datasheet) but I started thinking more and more that the frames coming from Ardiuno can't pass through the daughter card on its way to the MCU.
You can find screen images of two pins that I've measured attached to this reply.
I'm looking forward to your response.
Cheers,
Ozan