Skip to content

cdma_app.c does not work correctly #52

Description

@profroyk

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions