I was struggling for weeks with ethernet bugs on lpc1768 and i think that its now on the good way.
The attached patch contains theses mods :
warnings elimination in lpc176x_rtc.c
cosmetic changes to lpc17_mcpwm.c, lpc17_pwm.c,lpc17_timer.c, lpc17_dac.c
apps/NxWidgets/Kconfig : quote absent at end of line
lpc17_adc.c : Added burstmode ADC conversion mode, with CONFIG_ADC_BURSTMODE option in Kconfig.
burst mode do the 8 channels conversions in one pass (one interrupt for the 8 channels).
lpc17_ethernet.c : added possibility to use the kernel worker thread to do most of the workload,
with CONFIG_NET_WORKER_THREAD option in Kconfig,
a problem with PHY DP83848C : it doesnt need a specific initialization on mbed.
Finally found a bug i was chasing for weeks : from time to time (after some hours) the ethernet receiver lost
one receive interrupt and the ip stack never recover because
there is no receive watchdog as the transmit watchdog ! (where could it be implemented ?)
Debugged the mbed implementation, added the ADC, PWM, timers drivers, nuttx is running now on my mbed board.
arch/arm/src/armv7-m/up_initialstate.c : initial state of tasks have interrupts disabled if
CONFIG_SUPPRESS_INTERRUPTS is not selected (init value of zero disable the interrupts de facto
if CONFIG_ARMV7M_USEBASEPRI is select
ed). It is the case on cortex-m3, dont know for m4 ?
All these mods are tested on : lpcxpresso-lpc1768 and mbed,
may run on : zkit-arm-1769, nucleus2g,
maybe on : olimex-lpc1766stk
I'll try to post an example in a few days, if somebody is interrested.
Attachment(s) from himax-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org [nuttx] | View attachments on the web
1 of 1 File(s)
Posted by: himax-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org