Hello
I'm facing a trouble with the LPC1769 and LwIP stack. At some point, the receive task present in lpc17xx_40xx_emac.c just hang on sys_arch_sem_wait(&lpc_enetif->rx_sem, 0);.
As far as I can tell the Rx intterupts are no longer trigged (but TX interrupts are). In function ETH_IRQHandler it never goes inside the following IF block
if (ints & RXINTGROUP) {
/* RX group interrupt(s) */
/* Give semaphore to wakeup RX receive task. Note the FreeRTOS
method is used instead of the LWIP arch method. */
xSemaphoreGiveFromISR(lpc_enetdata.rx_sem, &xRecTaskWoken);
}
I have checked the 'Command', 'Status' registers, nothing seems anormal.
The (RxFilterCtrl - 0x5000 0200) register is OK and broadcasted message flag is set to allow reception
My project is based on LPCOpen 2.10 and derivate from the 'lwip_tcpecho_freertos' example. I have upgraded to FreeRTOS V8.2.3 and LwIP V2.0.0. The arch directory is almost the same
In lwipopts.h, i've made some changes to use static memory allocated @0x2007C000 and pbuff
My Computer send on braodcast address (255.255.255.255) an UDP packet on port 45454 every 100ms (17 bytes). The LPC send every 100ms 3 to 5 packets of 280 bytes each to the Computer address (which is retrieved from received packet on port 45454) I'm only using the Socket API.
I've been able to perfom some long run before the RX thread hang: 10h, and more than 2,000,000 packets exchanged before the error occurs. It sometimes hang sooner than that.
As the probleme occurs, even ping are not received. Transmission as already stated keeps working perfectly. The MCU and the Computer are plugged on the company network
As the problem occurs, all the thread and Queue of my application keep working normaly. Even the behaviour on the receiving socket is fine (Select keep timeouting as no message is received)
If you have any idea, it'll be great as i'm really stuck on this problem
Thanks
Original Attachment has been moved to: FreeRTOSConfig.h.zip
Original Attachment has been moved to: sys_arch_freertos.c.zip
Original Attachment has been moved to: lpc17xx_40xx_emac.c.zip
Original Attachment has been moved to: lpc_debug.c.zip
Original Attachment has been moved to: lpc_arch.c.zip
Original Attachment has been moved to: lpc_17xx40xx_emac_config.h.zip
Original Attachment has been moved to: perf.h.zip
Original Attachment has been moved to: lpc17xx_40xx_emac.h.zip
Original Attachment has been moved to: lpc_arch.h.zip
Original Attachment has been moved to: cc.h.zip
Original Attachment has been moved to: lwipopts.h.zip
Original Attachment has been moved to: sys_arch.h.zip