Re: STM32F4 Ethernet Issues

2022-08-23 Thread Fotis Panagiotopoulos
Hello, I was on vacation last week, so I didn't make any progress on this. I want to fix it, but I need guidance. No one has commented on this... Did anyone manage to reproduce the issue using my fork? On Tue, Aug 23, 2022 at 10:42 AM Sebastien Lorquet wrote: > Hi, > > is there any follow up o

Re: STM32F4 Ethernet Issues

2022-08-23 Thread Sebastien Lorquet
Hi, is there any follow up on this point? Sebastien Le 13/08/2022 à 16:44, Fotis Panagiotopoulos a écrit : Ok, I just managed to reproduce the issue on a NUCLEO-F429ZI, using the NuttX apps. Please check my fork on https://github.com/fjpanag/incubator-nuttx-apps/tree/tcp_issue See the branch

Re: STM32F4 Ethernet Issues

2022-08-13 Thread Fotis Panagiotopoulos
Ok, I just managed to reproduce the issue on a NUCLEO-F429ZI, using the NuttX apps. Please check my fork on https://github.com/fjpanag/incubator-nuttx-apps/tree/tcp_issue See the branch tcp_issue. I have "hacked" the NSH code to reproduce the issue. A TCP connection is opened, and then closed. Th

Re: STM32F4 Ethernet Issues

2022-08-12 Thread Alan Carvalho de Assis
Hi Fotis, Yes, I understood the point. Because it needs the right timing it could be trick to duplicate. Did you try to create a simple host server to try to emulate this connection issue? BR, Alan On 8/12/22, Fotis Panagiotopoulos wrote: > I think I understand the nature of the bug. > > When

Re: STM32F4 Ethernet Issues

2022-08-12 Thread Alan Carvalho de Assis
Hi Fotis, Nice, seems like you are narrowing down the numbers of variables, it will make easier to let us to replicate the issue when you find it. You also can use coloration and canaries to help with memory issues. BR, Alan On 8/12/22, Fotis Panagiotopoulos wrote: > Hi Alan, > > I am trying

Re: STM32F4 Ethernet Issues

2022-08-12 Thread Fotis Panagiotopoulos
I think I understand the nature of the bug. When closing a socket, tcp_close_eventhandler() is set as a callback in the dev->d_devcb list. Typically, the server's response (FIN ACK) will have as a result tcp_callback() to be executed, and thus the callback to be properly called, with proper argum

Re: STM32F4 Ethernet Issues

2022-08-12 Thread Fotis Panagiotopoulos
Hi Alan, I am trying hard to reproduce the issue reliably, but I haven't been able to do so yet. I noticed that when I disable CONFIG_NET_TCP_WRITE_BUFFERS, the problem does not disappear, rather it changes form. Now I occasionally get a failed assertion in wdog/wd_cancel.c line 95. I have to me

Re: STM32F4 Ethernet Issues

2022-08-11 Thread Alan Carvalho de Assis
Hi Fotis, Are you in sync with mainline? If you can create a host application to induce the issue will be easier for us to test. BR, Alan On 8/9/22, Fotis Panagiotopoulos wrote: > Hello, > > still trying to make the network work reliably. > After fixing another issue of my application, I hit

Re: STM32F4 Ethernet Issues

2022-08-09 Thread Fotis Panagiotopoulos
Hello, still trying to make the network work reliably. After fixing another issue of my application, I hit another problem. The following sequence causes NuttX to crash: 1. My application is creating a TCP socket and communicates with a server. 2. At one point the server stops responding (unrela

Re: STM32F4 Ethernet Issues

2022-07-26 Thread Sebastien Lorquet
Hi, good find but -I dont think any usual application tinkers with PHY regs during its lifetime except the ethernet monitor -the fix is certainly a lock somewhere but global or fine grained I dont know. Not all calls need to be locked, eg the one that returns the PHY address. Probaby not

Re: STM32F4 Ethernet Issues

2022-07-26 Thread Fotis Panagiotopoulos
Hello, I have eventually found 2 issues regarding networking in my application. I would like to discuss the first one. My code contains something like this: int sd = socket(AF_INET, SOCK_DGRAM, 0); struct ifreq ifr; memset(&ifr, 0, sizeof(struct ifreq)); strncpy(ifr.ifr_name, CONFIG_NETIF_DEV_

Re: STM32F4 Ethernet Issues

2022-07-19 Thread Fotis Panagiotopoulos
Hello, > We have deployed hundreds of boards with stm32f427 and ethernet, they > have all been working reliably for months without stopping, we know it > because they critically depend on network functionality and we have > reports if a card becomes unreachable. None has so far outside of > dedica

Re: STM32F4 Ethernet Issues

2022-07-19 Thread Sebastien Lorquet
Hi, We have deployed hundreds of boards with stm32f427 and ethernet, they have all been working reliably for months without stopping, we know it because they critically depend on network functionality and we have reports if a card becomes unreachable. None has so far outside of dedicated test

Re: STM32F4 Ethernet Issues

2022-07-19 Thread Nathan Hartman
On Tue, Jul 19, 2022 at 7:47 AM Fotis Panagiotopoulos wrote: > Hello! > > I am using Ethernet on an STM32F427 target, but I am facing some issues. > > Initially the device works correctly. After some hours of continuous > operation I completely lose all network communications. > Trying to trouble

STM32F4 Ethernet Issues

2022-07-19 Thread Fotis Panagiotopoulos
Hello! I am using Ethernet on an STM32F427 target, but I am facing some issues. Initially the device works correctly. After some hours of continuous operation I completely lose all network communications. Trying to troubleshoot the issue, I enabled assertions and various other debug features. Ag