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?