ADTJA1101 with S32K148EVB lwip example

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADTJA1101 with S32K148EVB lwip example

1,149 Views
HeeSu
Contributor I

i, I'm a student who is studying Automotive Ethernet communication.
I have trouble with the simulation of the lwip example on the S32K148EVB board.

I checked the input voltage option of each board, J5 of ADTJA1101 and J8 of S32K148EVB.

And it compiled well, with no errors on S32DS for ARM 2018.r1 and SDK 0.8.6 EAR.

So I have a question about the example works when it is well executed, and where is the main code of this example.

I think {project}/middleware/tcpip/tcpip_stack/demo/test.c is mainstream of this project.

And after flashing this file there is no happend.

I'm using a converter called RadMoon which converts BroadR-Reach to RJ45

But I think I have a problem setting nxp board myself.

Is there any idea about this situation?

Best regards,

0 Kudos
Reply
8 Replies

1,134 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @HeeSu 

This is a quick guide to show how to set up the TCP/IP example that can be found in the SDK.

You will need:

  • S32K148 EVB
  • Automotive ENET daughter card (TJA1100)
  • Media translator (Automotive ENET to 100/10 base T)
  • SDK version "S32K_SDK_EAR_0.8.6"

Before trying the example you will need a prior setting of the IP on your PC.

On Windows, this can be done from:

Control Panel -> Network and Internet -> Network and Sharing Center -> Change adapter settings -> Network adapter that connects to the board.

Select Internet Protocol Version 4 (TCP/IPv4) and click Properties; select Use the following IP address and configure the IP address and subnet mask. Configuration example: IP - 192.168.0.1, subnet mask - 255.255.255.0.

The example will assign an IP value of 192.168.0.200 to the S32K148. Therefore, the computer must be in the same domain for them to communicate.

Now that the computer is set up, you will need to import the SDK example into the S32DS. The example can be found in the following path \S32_SDK_EAR_0.8.6\examples\S32K148\demo_apps\lwip

Once the example is compiled, download it to the S32K148 EVB with the daughter card already connected.You will also need the media converter plugged into the ENET daughter cardboard and to the computer.

Once you have everything connected, run the example. It should not have any issue.

To verify that the example is correctly running. "ping" the board using the Windows command of the Windows console. Use the command ping 192.168.0.200 and the board should answer.

 

B.R.

VaneB

0 Kudos
Reply

1,104 Views
HeeSu
Contributor I

Hi @VaneB 

Thank you for your reply to my question.

I have an additional question about the ADTJA1101 board.

Is there any way to check the additional board's automotive ethernet is linked up? (meaning to check activated) 

And, If I want to make some packet in S32K board and send them to another board or PC, should I revise tcp_ip_thread() in lwIP package?

0 Kudos
Reply

1,091 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @HeeSu 

According to the documentation, the below functions can help you with what you are looking for, additionally. I recommend you check the available documentation of tcpip_stack.

TCP data is sent by enqueueing the data with a call to tcp_write(). When the data is successfully transmitted to the remote host, the application will be notified with a call to a specified callback function.

The tcp_listen() function returns a new connection identifier, and the one passed as an argument to the function will be deallocated. The reason for this behavior is that less memory is needed for a connection that is listening, so tcp_listen() will reclaim the memory needed for the original connection and allocate a new smaller memory block for the listening connection.

0 Kudos
Reply

1,073 Views
HeeSu
Contributor I

Hi @VaneB ,

I'm trying to run lwip example through S32DS for Arm 2018 R1.

I'm using Media translator as RadMoon  Automotive ENET to 100BASE-T1.

But in the active step, there is an error about making mainloopTask.

So I can't do the ping test through window CMD.

LWIP_assert is activated by 'ret == pdPASS' condition.

I tried to solve this problem, but i can't do this alone.

HeeSu_0-1683621849177.png

 

0 Kudos
Reply

1,063 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @HeeSu 

Could you verify when debugging in which part of xTaskCreate the code fails?

0 Kudos
Reply

1,026 Views
HeeSu
Contributor I

Hi @VaneB ,

I'm trying to debug this example but still have not solved it.

If this program runs well, I wonder if it is marked as multi-threaded in the debugging session.
 
I tried to run the ping_init example, but it looks still failed xcreateTask.
 
I think the media convertor has a problem.
 
Additionally, If I want to send a packet on the S32K board to the computer, should I set ADTJA1101 as a master?
0 Kudos
Reply

979 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @HeeSu 

Did you already test it with the last SDK version (4.0.3 for S32DS v3.4)?

0 Kudos
Reply

960 Views
HeeSu
Contributor I

Hi, @VaneB  

I tried both, but it still not working.

In xTaskCreate() function line 810, there is initialized XReturn to PdPASS.

But PdPASS already set 1U and In start_example() it says failed to create mainloop.

MainLoop is a critical part of this example because in the mainloop there is TCP/IP communication code.

I Set the S32K148 board configuration with 3V3 and extended the board set as Master and the same as 3V3.

And I Set the Media Converter (RADMOON) 's IP as 192.168.0.1 and the subnet mask set as 255.255.255.0.

HeeSu_0-1684564450159.png

HeeSu_1-1684564549995.png

 

HeeSu_3-1684564722951.jpeg

 

 

 

0 Kudos
Reply