I am new to Renesas Synergy platform. I am working on web server project. I am working on custom board and the controller part number is R7FS7G27G3A01CFP. And the ether PHY part is KSZ8091RNB. I created thread and named it as http thread and included netx http server stack in it. Web pages and related files are stored in sd card. Whenever the controller receives the request from the client, it reads requested file from the sd card and send it to the client. All pages are loaded to the client from the server successfully. It is working fine. But after some times web server stops working. After rebooting synergy custom board, it's working again for few minutes and then it stops working. While debugging, I checked whether the controller went into weeds. The controller didn't, but the control didn't go into http request notify callback function while the client was sending its request. Pinging web server's IP was also not working at that time. After restarting the board, everything was working fine for few minutes.
Why is this happenning? I don't know. If problem is with the hardware, then why is it working for first few minutes after turned on? Kindly help me to resolve this issue.
If I use 'ethernet switch' between router and synergy custom board, it is working fine. 'Ethernet switch' connected to router and my board connected to switch and my PC which is client directly…
How's it going? I found some threads that might be useful to you. The responder suggested using wireshark debugging tool. For more info, kindly refer to these urls:
(+) IP Instance stops working SSP 1.7.12 - Synergy - Forum - Renesas Synergy Platform - RenesasRulz
(+) Ethernet 0 Stops after some time - Synergy - Forum - Renesas Synergy Platform - RenesasRulz
I hope that can help you. All the best!
SaiRenesasRulz Forum Moderator
Thanks for your reply Sai,
I read both thread you mentioned. There were no solution for this problem. In one of the discussion, Paolo mentioned, Ethernet is working fine in isolating network, but not working in crowded network. That is the same problem I am facing. When I connect my board directly to PC, here PC is client and my board is web server, it is working more than a day without giving any trouble. If I connect my board to router, then the problem arises after some time of working. If the board stops working, it needs soft reset or power reset to work again. While debugging mode, if the board stops working, it doesn't need power reset, the soft reset is enough to make that board working again.
Sounds like you're running out of some resource like memory for the netx stack or web stack. Or you might have some issue with a resouce not being properly protected with semaphores, or something similar.
I would run it with a debugger atrached and monitor resouces like packet pools. You could also add some console commands to print these kinds of stats. You can use TraceX to understand what's running when your system runs correctly and incorrectly.
You could try increasing task stack sizes and some of the pkt pools - maybe it will go away.
Thanks for your suggestion, larry.
I have checked all the resources. There is no deficiency of resources. The maximum used stack of each thread is not more than 40%. Two Netx packet pool is created. One for IP thread and another one for HTTP thread. Number of packets in each pool is 50. Each packet size in bytes is 1568. I have used printf function to print the nx_packet_pool_info in the Renesas debug console view.
In both condition, While the http server is working and not working, the packet pool info are:
IP Packet pool info:Total Packets: 50Free Packets: 42Empty Pool Reqests: 0Empty Pool Suspensions: 0Invalid Packet Releases: 0
HTTP Packet pool info:Total Packets: 50Free Packets: 50Empty Pool Reqests: 0Empty Pool Suspensions: 0Invalid Packet Releases: 0
I couldn't find any problem in TraceX debugging tool.
In the middle of working, the http server stops. I have checked packets between my PC and custom synergy board using Wireshark. Packets are transmitted and received in both sides. But suddenly, there is no response from the http server for the request from client. The client re transmits the request, but no response from board. After reset, it's working good. For some time. Then it stops.
Is there anything I have to do or check?
I guess after the http thread becomes non-responsive Id hook up debugger and see where things are - what happens to your incoming request.
Do you have a hard fault handler that just dies bkpt instruction? That will stop things while you get debugger going and can see if these was a crash.
You may have to instrument the code and write data to the ETM ports to capture the execution flow with thd debugger attached to get more idea of the flow.
But the debugger and hard fault seem a goid place to start.
If I use 'ethernet switch' between router and synergy custom board, it is working fine. 'Ethernet switch' connected to router and my board connected to switch and my PC which is client directly connected to router. In this condition, my board working more than a day without trouble. This serves my purposes.
But still I don't get why my board is not working while it is connected to router without switch. Anyway I met my requirements. Thanks to all.
Thanks & Regards,