cdma_app.c does not work correctly
I've been following the Zynq-7000 SoC Embedded Design Tutorial (2023.2) using a Digilent Zybo Z7-20. The cdma-app showed FAIL even though the DMA transfer occurred (I used the Memory inspector to read 0x2000_0000 (the source) and 0x3000_0000 (the destination). I root caused the problem to the buffer compare where it appears that 256 bytes were being compared (Length=64*sizeof(u32)) even though only 64 bytes were transferred in the DMA transfer.
The fix was pretty easy once I figured out so I thought I'd share. The problem was in the SrcPtr and DestPtr declarations. I changed the declarations as shown: // Changed from original code to fix pointer references u8 SrcPtr = SourceAddr; u8 DestPtr= DestAddr; // end changes
Both the source and destination buffers were defined as u8 in the version of the app that I downloaded so now SrcPtr and DestPtr can access the u8 "array".
Roy
Thank you, Roy!
Hi @profroyk, did you ever encounter a problem were the program execution simply halts at the first print message 'Entering Main'?
Sorry. I haven't returned to this test app. If you are asking a general question - does the debugger hang on the first instruction. I've seen many cases where the debugger hangs - I don't remember whether this was one of them, though. I found what works best for the debugger is to use Optimization: -00, Debug -g3. When I create the app that way I can single step, stop at breakpoints, etc. w/o the jumping around that you could get w/ optimization. According to something I read -g3 will even execute C macros...which are the basis for many of the standalone IP drivers.
Roy