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,
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:
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
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?
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.
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.
Hi @HeeSu
Could you verify when debugging in which part of xTaskCreate the code fails?
Hi @VaneB ,
I'm trying to debug this example but still have not solved it.
Hi @HeeSu
Did you already test it with the last SDK version (4.0.3 for S32DS v3.4)?
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.