HI.
In our proprietary board we have two ethernet interfaces (one for the lan and one for the wan). After a random time, it can be minutes or days, the interfaces stops working (mainly the wan that has telnet server). When interfaces crash, they don't even respond to ping.
I tried to debug the problem but unfortunately E2studio crashes after a while. What I have seen is that the IP Helper threads keep working even if they don't respond to the ping.
Now I have also enabled the traceX hoping to understand something. What do you think I should focus on?
Best Regards
Paolo
I do remember seeing a post about ethernet stop working :-
https://renesasrulz.com/synergy/f/synergy---forum/15599/ethernet-reception-issue
the user reported that resetting "bds_in_chain" at the end of the do..while() loop in the nx_rx_interrupt() function fixed the issue.
The same user had a issue with the ethernet PHY hardware, on their own hardware.
I try.
Thanks
Hi Jeremy.Unfortunately changing the variable reset didn't work in my case (if I understand it correctly). I made the following change:
.Ethernet statistic
Total packets sent: 166525 Total bytes sent: 120059522 Send packets dropped: 0 Total packets received: 3065627 Total bytes received: 8576741 Received packets dropped: 2938960 Received checksum errors: 0 Invalid packets: 2 Total fragments sent: 0 Total fragments received: 0 Packets pool (free/tot): 48/64 Empty pool request: 0 Empty pool suspensions: 0 Invalid packets release: 0
As you can see this time the Empty pool request was 0. The device that is on separate VLAN, for the moment, continues to work.
Paolo,
Can you confirm if in your case also always getting a corrupted packet_type ?
Thanks,
Oscar.
Hi Oscar.
"Invalid packets: 2"
I think they fall into those two packages
There can be an issue if an unaligned access occurs across the boundary between SRAMHS and SRAM0 at 0x20000000. Memcpy can cause an unaligned access accros the memory boundary sometimes :-
https://renesasrulz.com/synergy/synergy_tech_notes/f/technical-bulletin-board-notification-postings/15610/gcc-newlib-nano-memory-operations-memcpy-and-memmove-cause-incorrect-data-read-when-crossing-sram-boundaries
and :-
https://renesasrulz.com/synergy/f/synergy---forum/15841/memcpy-fails-on-s5d9
and memcpy is used in a couple of places in NetX and NetX DUO :-
Hi Jeremy.I wrote my version of memcpy which shouldn't suffer from unaligned access problem.
However, I have set the -mno-unaligned-access option. I'll let you know if it solves.
There is also an issue with malloc, as it is not thread safe. If malloc is used, then the lock mechanism needs to be implemented.
I don't use malloc in my code. Also doing a search in the files it seems that they are not used by libraries either. I will keep you updated
Hi.
Unfortunately the -mno-unaligned-access option did nothing. Instead the device that has the separate network continues to work. Seeing as the changes didn't work out I'm back with the options and default code.
In this case this shouldn't be a problem, as a separate network will be used with one or at most two devices connected, but on other implementations we plan to develop with these libraries it could be a problem.