Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erorr in axidma_setup_vdma_config(struct xilinx_vdma_config *dma_config) function #28

Closed
sploet opened this issue Oct 21, 2017 · 1 comment
Labels

Comments

@sploet
Copy link
Contributor

sploet commented Oct 21, 2017

Have a look at the file axidma_dma.c for the function "static void axidma_setup_vdma_config (*******):

// Setup the config structure for VDMA

static void axidma_setup_vdma_config(struct xilinx_vdma_config *dma_config)
{
memset(dma_config, 0, sizeof(dma_config));

dma_config->frm_dly = 0;            // Number of frames to delay
dma_config->gen_lock = 0;           // Genlock, VDMA runs on fsyncs
dma_config->master = 0;             // VDMA is the genlock master
dma_config->frm_cnt_en = 1;         // Interrupt based on frame count
dma_config->park = 0;               // Continuously process all frames
dma_config->park_frm = 0;           // Frame to stop (park) at (N/A)
dma_config->coalesc = 1;            // Interrupt after one frame completion
dma_config->delay = 0;              // Disable the delay counter interrupt
dma_config->reset = 0;              // Don't reset the channel
dma_config->ext_fsync = 0;          // VDMA handles synchronizes itself
return;

}

I think that string

**memset(dma_config, 0, sizeof(dma_config));**

is needed for the cleaning a "struct dma_config", so you have to provide the size of the struct, something like this:

**memset(dma_config, 0, sizeof(struct xilinx_vdma_config));**

BTW, My Respect for software your created. It is really cool.
I am trying to run it on the zynq ultrascale+ and have some issues.
Look at here please: #27

@bperez77 bperez77 added the bug label Oct 21, 2017
@bperez77
Copy link
Owner

Thanks, and good catch! I'll be pushing up your fix in a moment.

bperez77 pushed a commit that referenced this issue Oct 21, 2017
This closes #28, courtesy of @sploet. The issue was the incorrect
parameter was used for `sizeof` in a `memset` call. The size was taken
of a pointer, instead of the structure itself.
bperez77 pushed a commit that referenced this issue Oct 21, 2017
This closes #28, courtesy of @sploet. The issue was the incorrect
parameter was used for `sizeof` in a `memset` call. The size was taken
of a pointer, instead of the structure itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants