Attachments are accessible only for community members.
Not applicable
Mar 24, 2016
02:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 24, 2016
02:16 AM
Hi,
i have several problems using the httpserver_raw example from the xmclib.
The server is working and can be pinged, but its response was quiet slow, therefore i enabled debugging and recognized, that there is a lot of pbuf allocation and freeing:
This holds true, even if the ethernet cable is removed.
Another issue, is that dhcp is working only sporadically. In the most cases after a reset, no DHCP-packet is send out(debugged with wireshark).
Just set the define flag in the main.c to see this bevaviour.
Find attached the whole project.
Best regards,
Stefan
i have several problems using the httpserver_raw example from the xmclib.
The server is working and can be pinged, but its response was quiet slow, therefore i enabled debugging and recognized, that there is a lot of pbuf allocation and freeing:
pbuf_free: deallocating 0x20006d68
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x20006d68
pbuf_alloc(length=0) == 0x20006d68
pbuf_free(0x20006d68)
pbuf_free: deallocating 0x20006d68
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x20006d68
pbuf_alloc(length=0) == 0x20006d68
This holds true, even if the ethernet cable is removed.
Another issue, is that dhcp is working only sporadically. In the most cases after a reset, no DHCP-packet is send out(debugged with wireshark).
Just set the define flag in the main.c to see this bevaviour.
Find attached the whole project.
Best regards,
Stefan
6 Replies
Mar 28, 2016
07:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 28, 2016
07:55 PM
Hi,
Do you think it would be helpful if you try the lwIP forum? As I have limited knowledge on the stack which I am also trying to build my knowledge n experience while working on this. So sorry about this. 😞
Do you think it would be helpful if you try the lwIP forum? As I have limited knowledge on the stack which I am also trying to build my knowledge n experience while working on this. So sorry about this. 😞
Not applicable
Apr 01, 2016
10:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 01, 2016
10:35 AM
Hi travis,
In my opinion the problem is not within the lwip stack, but in the mac driver or the phy-driver, respectively.
i have used lwip at a few other controllers(st,ti) and a simple udptransmission was never a problem, therefore, lwip should run.
it is really a pity, that infineon is not capable of providing a functional ethernet driver for XMC4500 even after years of driver (and time-wasting app) development.
best regards, red
In my opinion the problem is not within the lwip stack, but in the mac driver or the phy-driver, respectively.
i have used lwip at a few other controllers(st,ti) and a simple udptransmission was never a problem, therefore, lwip should run.
it is really a pity, that infineon is not capable of providing a functional ethernet driver for XMC4500 even after years of driver (and time-wasting app) development.
best regards, red
Not applicable
Apr 18, 2016
01:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 18, 2016
01:05 AM
Hey red,
I've got similar issues working with the XMC4800 http-example. To me it looks like a memory corruption in the pbuf-pool, but I didn't manage to find it by now. Changing to malloc (MEMP_MEM_MALLOC = 1) and polling the ethernet-interface without interrupts fixed things for me, but I still wonder why pbufs don't work.
Generally it seems to me like the software-devs at Infineon have some issues understanding concurrency. I just started working with their hardware - and lwip - so I might have got something wrong, but this is what I found by now in my example code:
Having worked with Atmel and Microchip I'm a bit shocked be the quality of the examples. I found similar issues in their other examples.
Edit: Just found another issue.
I've got similar issues working with the XMC4800 http-example. To me it looks like a memory corruption in the pbuf-pool, but I didn't manage to find it by now. Changing to malloc (MEMP_MEM_MALLOC = 1) and polling the ethernet-interface without interrupts fixed things for me, but I still wonder why pbufs don't work.
Generally it seems to me like the software-devs at Infineon have some issues understanding concurrency. I just started working with their hardware - and lwip - so I might have got something wrong, but this is what I found by now in my example code:
- ethernetif.c: ETH0_0_IRQHandler: XMC_ETH_MAC_ClearEventStatus is called after reading the packets -> A packet-reception event might be lost.
But who cares: There is always some traffic on the network, that will wake up the system eventually - ethernetif.c: ethernetif_input: pbufs are allocated and freed in and outside the interrupt context, but neither sys_arch_protect, nor sys_arch_unprotect are implemented.
- ethernetif.c: low_level_input: pbufs (of size 0) are allocated, even if there is no packet to be picked up
- ethernetif.c: low_level_input/low_level_output: Both functions use the same buffer, although one is called from the interrupt context and the other isn't.
Having worked with Atmel and Microchip I'm a bit shocked be the quality of the examples. I found similar issues in their other examples.
Edit: Just found another issue.
Not applicable
Apr 18, 2016
01:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 18, 2016
01:41 AM
Just found yet another issue handling pbufs in ethernetif.c: low_level_input/low_level_output (reading the documentation is overrated), but unfortunately it did not solve my issues. -> Back to malloc.
Not applicable
Apr 25, 2017
06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 25, 2017
06:57 AM
why there are no reply to these posts?
Apr 27, 2017
12:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 27, 2017
12:05 AM
Hi,
Please update your projects using the latest XMCLib or using the latest version of the ETH_LWIP/HTTP_SERVER APPs.
Several fixed have been done since then.
Regards,
Jesus
Please update your projects using the latest XMCLib or using the latest version of the ETH_LWIP/HTTP_SERVER APPs.
Several fixed have been done since then.
Regards,
Jesus