RE: Bug about FreeRTOS.org STM32 demo using Eclipse, OpenOCD and GCC

posted Feb 5, 2010, 8:58 AM by Stefano Oliveri
I received a bug report a few days ago, but the provided mail address generates a Mail Delivery Subsystem error. Following is the original message and my reply.

Original message

1st the Bug #3.3 with the duplicate ethernet frames seems not to be solved with setting the SendCount to 2. (You've done it already in the current release). As I see it you always send an ethernet frame twice in the vMAC_ISR();


2nd  memory is allocated in vSendMACData with s_lwip_buf = prvGetNextBuffer(); This function tries 30 times to allocate buffer and returns NULL if it fails. In this situation you surely write a NULL-address into xTxDescriptor.Buffer1Addr. This will cause a bus fault.


In my opinion it might also be better to leave the lwip-source untouched and put the stm32x_ethernetif.c into the Demo-Code


Reply


About the bug #B3.3. The are two places in the driver code where I set the SendCount parameter, but only in one place I set it to the correct value (2). I just uploaded a new version of the demo v1.4.1. I also changed some lwIP configuration parameters. You find it on the Download area as usual. Could you please check that version respect to 3B3.3?

About the bus fault problem. The function prvGetNextBuffer never fails in my test! I think there is enough time for the MAC to send an outgoing frame or for the lwIP to process an incoming frame in order to avoid "no free buffer condition". Can you give more information in order to reproduce the problem?

Finally, I agree with you about the bad placement of the stm32x_ethernetif.c file. I think to put it under lwip/contrib/netif folder. I'm just too lazy regards this point until now! Sorry



Comments