Forum Discussion
Altera_Forum
Honored Contributor
12 years agoThank you for the response. To prove the HW is good I used the iNicheStack example which works as expected, no lost packets, pings work, can open a socket. However our application uses the Micrium TCP/IP stack. The driver is provided by Micrium but is heavily based on the Altera version. I'll check through the driver and add code if necessary to check the DMA transfer is complete before writing more data.
The problem does suggest a timing/overwrite problem because if I set a breakpoint before just before and just after the DMA registers are written, send the ping, the first breakpoint is hit, then continue to the next breakpoint, and watch what happens with Wireshark, the packet is correct…most for the time. I say most of the time because I have still seen incorrect packets transmitted. The reason I have the two breakpoints here is to observe the DMA registers before and after the transfer, and to see how many bytes where actually transferred, which is always correct. So either the address the DMA controller is reading from changes, or the data where it is reading from changes. I don't think the simple examples that Altera provides have a cache, but I should check.