Altera_Forum
Honored Contributor
21 years agoAnother Lan91C111 LWIP problem!
I tried running the Nios Stratix DevKit on a 10BaseT link (rather than 100BaseT), and was surprised when everything fell apart.
Ethereal shows that certain longish packets would switch half-way through to containing data from what should have been the subsequent packet - because the low-level packet output isn't correctly waiting for the previous packet to be sent before sending the next one. On a fast link, this seems not to be a problem, but the 10MBit speed shows up the bug. The fix which seems to work is to insert the following line at the top of the low_level_output routine in altera_avalon_lan91c111.c, immediately before polling the TX_empty bit. This is needed because the TX_empty bit is latchedIOWR_ALTERA_AVALON_LAN91C111_ACK(dev->base_addr, ALTERA_AVALON_LAN91C111_INT_TX_EMPTY_INT_MSK ); Check page 62 of the LAN91c11 datasheet to read WHY this is needed. The PDF is protected, so I can't paste the sentence in here! - Roddy