lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] STM32 RBUS (Receive Buffer Unavailable) bit set after debug


From: Mark Lakata
Subject: [lwip-users] STM32 RBUS (Receive Buffer Unavailable) bit set after debugger break
Date: Wed, 12 Sep 2012 15:35:49 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1

I've got my STM32F407 port for FreeRTOS 7.2 and lwIP1.40 running now, with ping and HTTP working well (I started with the ST's demo which was based on FreeRTOS6.1.0 and lwIP1.3.2, and merged it into the latest code).

However, if I stop the program momentarily with the debugger, or hit a breakpoint, the lwIP stack slows down a lot. The ping time goes from <1ms to 300-500 ms typically, sometimes > 2000 ms. It is easy to reproduce, including the original ST demo code:
  1. run demo code
  2. count to 5
  3. do a ping from another computer
  4. hit 'break' in the debugger from IAR EWARM
  5. hit 'run' right away
  6. do another ping


I think it is related to this problem, discusses in an earlier thread: http://lists.nongnu.org/archive/html/lwip-users/2012-05/msg00111.html

It seems that once you stop the CPU, the DMA engine gets tied up in knots and doesn't recover, until a reset. It is related to the RBUS interrupt flag (Receive Buffer unavailable) in the ETH_DMASR status register. I see this bit go high forever once the problem occurs. It does not self clear with the existing code.

I'm sure this can be fixed with a software workaround, but I haven't found it or figured it out. I'm just starting out on lwIP and the STM32F4x7 (first week).

Any ideas?

thanks,
Mark Lakata





reply via email to

[Prev in Thread] Current Thread [Next in Thread]