ARMmbed / sal-stack-lwip

LwIP package for mbed
Other
4 stars 14 forks source link

sal-stack-lwip has a dependency on systick #37

Open bremoran opened 8 years ago

bremoran commented 8 years ago

Systick should not be required for ethernet.

the systick handler in sal-stack-lwip calls eth_arch_timer_callback and increments a systick_ms counter. The eth_arch_timer_callback API should be called from a minar periodic task. The APIs that require systick_ms should use another API to provide it, e.g. lptimer, or minar_platform.

ciarmcom commented 8 years ago

ARM Internal Ref: IOTSFW-1457

bremoran commented 8 years ago

This is causing an additional failure case, where, under heavy load, systick interrupts while memp_free is happening, which seems to cause a race condition.

This may be because sys_check_timeouts is called from interrupt context, so it can happen while sys_check_timeouts has already been called. I don't know if sys_check_timeouts is reentrant or not, but this doesn't seem good. I've tried removing that call from the ethernet interface, and it seems to work with a statically configured IP. I haven't yet been able to validate whether or not it fixes the halt condition that I'm trying to track down.