I ended up tracking down an old 4a image and I got my satisfaction. The problem isn't with ARP exactly, it's a problem with timers. My network sometimes drops the first frame sent on the network, and the board never times out reception of an ARP reply and never resends. I tracked this down to a single line that was changed in dbug/src/cpu/coldfire/mcf5xxx/mcf5xxx_timer.c:
timer_set_secs(uint8 channel, uint32 secs)
{
uint32 timeout;
/* Get the timeout in seconds */
- timeout = (uint32)(((timer[channel].period * 0xFFFF)/1000000000) + 0.5);
+// timeout = (uint32)(((timer[channel].period * 0xFFFF)/1000000000) + 0.5);
+ timeout = (uint32)(((timer[channel].period * 0xFFFF)/1000000000));
if (timeout == 0)
{
timer[channel].reference = 1;
return FALSE;
}
It turns out that the period for the MCF5329 is set to be:
#define TIMER_NETWORK_PERIOD 1000000000/0x10000
The timer init sets (timer[channel].period = (float) TIMER_NETWORK_PERIOD), and then the math above does the division again, so even in the best floating point implementation the result is 0xFFFF/0x10000 which is very nearly 1, but not quite. This is why I think the original code fudged upwards by 0.5, but this was deleted, and hence on the MCF5329, no timers. Reverting that change fixed everything.
Message Edited by PaulS on 2009-06-03 07:47 PM