I am attempting to implement an EMAC driver for our project, which runs on a TMS320C6748 DSP. However I am running into issues that seem to come from the DMA controller.
My configuration:
The EMAC module is running at 10Mb/s in full-duplex mode on channel 0 only.
Flow control is off for both Tx and Rx (turning them on does not seem to affect my results).
The Rx channel is setup to accept unicast and broadcast frames.
Loopback is enabled to remove external hardware from the equation during debugging(except the 50MHz clock, which is provided by an external oscillator), and I have enabled RXCAFEN and RXCEFEN flags so that I receive any data coming in on Rx channel 0.
All buffers are 4-byte aligned.
The Rx channel seems to receive valid frames, as the Rx frame counter registers do not report any bad frames (also tested with the RXCxFEN flags off). The TXGOODFRAMES and the RXGOODFRAMES registers show the same frame counts every time. However, the data that I get from the DMA is often incomplete or entirely zero’s.
An example Tx frame:
0000: ff ff ff ff ff ff 60 09 c3 0e f2 ac 08 00 45 00
0016: 01 50 00 07 00 00 ff 11 ba 96 00 00 00 00 ff ff
0032: ff ff 00 44 00 43 01 3c e8 2d 01 01 06 00 00 00
0048: 27 81 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0064: 00 00 00 00 00 00 60 09 c3 0e f2 ac 00 00 00 00
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0096: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0112: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0128: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0144: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0176: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0192: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0208: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0224: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0256: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0272: 00 00 00 00 00 00 63 82 53 63 35 01 01 39 02 05
0288: dc 37 03 01 03 1c ff 00 00 00 00 00 00 00 00 00
0304: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0336: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
And an example Rx result:
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0064: 00 00 00 00 00 00 60 09 c3 0e f2 ac 00 00 00 00
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0096: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0112: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0128: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0144: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0176: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0192: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0208: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0224: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0256: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0272: 00 00 00 00 00 00 63 82 53 63 35 01 01 39 02 05
0288: dc 37 03 01 03 1c ff 00 00 00 00 00 00 00 00 00
0304: 00 00 00 00 00 00 00 00 00 00 00 00
Obviously a lot of data is missing and represented as zero’s, but the data that was captured does align with the data in the sent frame.
Can anyone help me figure out what is going wrong here and how I can get the EMAC module to play nice?