Forum Discussion
Altera_Forum
Honored Contributor
15 years agoIt works.. i changed the LEN value from 32 to 128.
Why did it work? I am just trying my luck changing everything
/* Post the transmit request */
if ((rc = alt_dma_txchan_send (txchan,
tx_data,
128,
NULL,
NULL)) < 0)
{
printf ("Failed to post transmit request, reason = %i\n", rc);
//exit (1);
}
/* Post the receive request */
if ((rc = alt_dma_rxchan_prepare (rxchan,
rx_buffer,
128,
txrxDone,
NULL)) < 0)
before it was 32 (since i want 32 bytes per transaction) Final result..
bash-3.1$ nios2-terminal
nios2-terminal: connected to hardware target using JTAG UART on cable
nios2-terminal: "USB-Blaster ", device 1, instance 0
nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)
loop start
0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:testing fifo & onchip : dma operation
content of onchip:before DMA operation
0: 64
1: 65
2: 66
3: 67
4: 68
5: 69
6: 6a
7: 6b
8: 6c
9: 6d
10: 6e
11: 6f
12: 70
13: 71
14: 72
15: 73
16: 74
17: 75
18: 76
19: 77
20: 78
21: 79
22: 7a
23: 7b
24: 7c
25: 7d
26: 7e
27: 7f
28: 80
29: 81
30: 82
31: 83
32: 0
33: 0
Transfer successful!
content of onchip:after DMA operation
0: 0
1: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: a
11: b
12: c
13: d
14: e
15: f
16: 10
17: 11
18: 12
19: 13
20: 14
21: 15
22: 16
23: 17
24: 18
25: 19
26: 1a
27: 1b
28: 1c
29: 1d
30: 1e
31: 1f
32: 0
33: 0
FIM
Thanks for the help!!