Hi guys,
I am facing this problem for a long time and different versions of Keil.
When net_eth.o is in off-chip RW_RAM1 (beginning at 0x60000000) networking does not work properly. (STM32F4xx, Network Component 7.12) Simplified Problem:
Thread 1:
netInitialize(); osThreadNew(ts_net_thread); socket(); ioctlsocket(set non-blocking); connect(); set socket connecting while(1){ osEventFlagsWait(.....); if( received ){ PrintData(); } }
Thread 2 - ts_net_thread:
while(1){ osEventFlagsWait(any, 1500ms); if(socket is connecting){ int ret = connect(sckId, .... ); if( ret == BSD_ISCONN) socket = connected; } if(socket is connected){ int ret = recv(scktId, .... ); if( ret < 0) print("0x%X"); else osEventFlagsSet(datarecvd) } }
When the code is compiled and eth is in RW_IRAM1 recv does not return BSD_ELOCKED but when eth is in RW_RAM1 problem appear and recv() returns BSD_LOCKED.
Earlier I find that there should be a problem with ETH driver and DMA. Does anybody have a hint to this problem?
Hi, I am realy sorry. It was my fault. I cant beleive I did it. NULL pointer access to really big class and it overwrites variables in net lib. But I found the solution thanks to you! In RTX RTOS view I wanted to tell you that all mutexes all unlocked and that time I realized that they should not be all unlocked! But this behaviour is similar to problem I had a long time ago. Thank you for your time!