I'm sending continuous data packets from PC client to S32k148 uC server, after some point the netconn_recv gets hanged and doesn't come out of loop.
I've sent the packets from client but noe received in server.
What's the problem here and how can it be solved?
Thanks in advance..
Solved! Go to Solution.
Hi @Nhi_Nguyen ,
Thanks for sharing the source code we'll test it and get back to you.
I enabled the DHCP as it's needed for our project initially ut assigns a IP from DHCP server, ping also works but after sometime it's showing request timeout and the destination host unreachable.
What might be the reason and how to resolve this?
Thanks & regards
Rak
Hi rak14,
This is response from SW team:
"As I understood the customer is sending continuous data packets, while doing this after some time the packets are getting lost.
The issue was reproduced on the reported software version S32K1 SDK3.0.2 by sending messages every 100 ms, the TCP server stopped receiving messages. It looks like there is no indication of a new message from the enet driver.
Solutions and recommendations for the customer:
If integration of the latest software package is not possible please try the following:
#define ENET_RXBD_NUM 4
#define ENET_TXBD_NUM 4
Best regards,
Nhi
Hi @Nhi_Nguyen ,
Thanks for the update.
1. We tried increasing the ENET_RXBD_NUM & ENET_TXBD_NUM to 10 sent the data every 500ms but still it's not working.
2. Currently we are using:
Thanks & regards,
Rak**bleep**h
Hi Rak14,
This is from SW team
"
RTD Standard software can be downloaded from here: https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=SW32K1-RTD44-D
Reference software can be downloaded from here: https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=SW32K1-REFSW-D
Please follow the documentation for installation details.
The issue how it has been diagnosed so far comes from the low level driver, and I could not continue with the analysis."
How did you configure Clock for TX_CLK and RX_CLK? and Port?
Did you try to measure signal at TX_CLK and RX_CLK? you're configuring MII 100 Mbps, so 2 these signals need to provide from external clock source is 25MHz.
Because ETH driver didn't receive message, so did you try to measure signal on both 4 Tx and RX data pins when you transmit/receive message to avoid interrupt by configuring or signal on board?
Best rehards,
Nhi
Hi,
We are giving the Clock to the TX_CLK & TR_CLK from PHY (to the PHY from external crystal) with 25MHz clock for MII 100Mbps mode.
We can't measure the signals of 4 TX & RX pins when it hangs right? Because we'll be not knowing when it will hangs.
Thanks
Hi Rak14,
Could you please send me value of registers ENET after any frame was sent to Chip?
Best regards,
Nhi
Hi Rak14,
I saw this from registers that you sent me:
<register path="ENET/IEEE_R_CRC" value="0x00000002"/>
Form my view of low level driver, this usually come from RX_CLK is incorrect or not stable. But, because you received some frames, so my thought is second point, Rx_Clk is not stable. So, please sure that RX_CLK is stable and is 25 MHz. I'll ask upper layer if they have any experience about this.
Best regards,
Nhi
Hi rak14,
This is feedback from Stack team:
"
I’m not sure about this. It could be the clock or something else that might be fixed in the meantime. That is a very old version of TCPIP.
As Liviu said, I would suggest to customer to install these packages and see if the issue still happens. On these packages we could not see the issue anymore. They are working on S32DS 3.4.
Also, we plan a new release for S32K1 on September and if you like, we can see if that issue still occurs or not.
"
Best regards,
Nhi
Hi @Nhi_Nguyen ,
I've installed the following:
Can I get the example code where TCP/IP (1.0.1), FreeRTOS(1.0.1) and Ethernet driver are combined?
Or the example code which doesn't get hang which was tested by NXP SW team it would be helpful.
Thanks & regards,
Rak
Hi @rak14 ,
SW team said that they have an example but it need to import into Design Studio. Can you import to this tool?
Best regards,
Nhi
Yes I can import as the IDE is S32 Design studio for S32 platform v3.4.1.
Hi @rak14 ,
SW team said that the example was available in the package.
" You can import the example from
File -> New -> S32DS Project from example. There is lwip_s32k148 example provided by TCP/IP update site, that can be imported and tested further.
"
Best regards,
Nhi
Hi @Nhi_Nguyen ,
In S32K1xx SDK RTM v4.0.2 example projects -> lwip_s32k148 example was there but TCP/IP and FreeRTOS vrsion was 1.0.0. I tested this one it was hanging.
That's why if you can provide the example code which is working it would be helpful.
Thanks
Rak
Hi @rak14 ,
This is response from SW team:
"
You don’t need to use S32SDK S32K1XX RTM 4.0.2 package anymore because from now on we use only these 3 packages:
Make sure you import the lwip_s32k148 from TCP/IP 1.0.1, not from S32SDK S32K1XX RTM 4.0.2.
"
Best regards,
Nhi
Hi,
I tried with that but I couldn't build it properly that's why I asked the integrated example code, it will helpful if the tested code was provided.
Thanks in advance
Hi @rak14 ,
Because example is always verified before the package was public. So, what error did you encounter with this example? Could you please capture it?
Best regards,
Nhi
Hi @Nhi_Nguyen,
In the lwip_s32k148 example only this much is there no stack code or nothing present I tried to generate using code generator but after that also no code were present it's showing:
Issue: Code generation failed
Level: Error
Type: Tool problem
Tool: Peripherals
Origin: Peripherals
Resource: Sources
Information: Code generation failed
Thanks
Rak
Hi @rak14 ,
I tried to install 3 packages include:
You can check packages updated by:
I can generate the example without error:
I attached release note that you can refer to see how to install packages.
Best regards,
Nhi
Hi @Nhi_Nguyen , When I open the peripheral configurator for freeRTOS/ TCP/IP example I'm getting the following error. How can I resolve the same?
Thanks
Rak
Hi @rak14 ,
Maybe this came from your tool version. But from my point of view, there was no error that was in Problem view showed, so, no problem. In my site, I got same issue, but I was still generate code normally. Just ensure that you installed all packages that required.
Best regards,
Nhi