element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Avnet Boards General Zedboard AXI DMA m_axis_mm2s_tdata[31:0] stuck on zero
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 2 replies
  • Subscribers 363 subscribers
  • Views 753 views
  • Users 0 members are here
  • Using Xilinx Tools
  • ZedBoard General Questions
  • Zynq Mini-ITX Hardware Design
  • Zedboard Hardware Design
  • PicoZed Hardware Design
  • Zynq Mini-Module Plus (MMP) Hardware Design
  • MicroZed Hardware Design
  • MiniZed Hardware Design
  • Zedboard Training
Related

Zedboard AXI DMA m_axis_mm2s_tdata[31:0] stuck on zero

maiatec
maiatec over 6 years ago

My application is to transfer a 32 bit from DDR (using DMA) to PL.

I connected the ILA to see the data at the m_axis_mm2s from axi_dma and it shows the m_axis_mm2s_tdata[31:0] always zero besides m_axis_mm2s_tready, m_axis_mm2s_tvalid and m_axis_mm2s_tlast seems ok.imageimage

Cabeçalho 1

/*****************************************************************************/

/**

* @file streamExampleSimpleDMA.c

*

* In this file the basic set up of streaming a package buffer over the AXI

* Stream Interface to a Custom IP core in PL. This is example is highly

* inspired by examples from Xilinx.

*

* <pre>

* MODIFICATION HISTORY:

*

* Ver Who Date Changes

* ----- ---- -------- -------------------------------------------------------

* 1.00a jcla 03/04/16 The example is created based on other examples from

* Xilinx

 

* ***************************************************************************

 

*/

/***************************** Include Files *********************************/

#include "xaxidma.h"

#include "xparameters.h"

#include "xdebug.h"

 

 

/******************** Constant Definitions **********************************/

 

/*

* Device hardware build related constants.

*/

 

#define DMA_DEV_ID XPAR_AXIDMA_0_DEVICE_ID

 

#define MEM_BASE_ADDR 0x40400000

 

#define TX_BUFFER_BASE (MEM_BASE_ADDR + 0x00100000)

 

// The example can be extended to feature a larger stream package, but for

// simplicity it is now set to 0x1

#define MAX_PKT_LEN 0xe //0x20

 

#define TEST_START_VALUE 0x6

 

#define NUMBER_OF_TRANSFERS 10

 

 

/************************** Function Prototypes ******************************/

 

#if (!defined(DEBUG))

extern void xil_printf(const char *format, ...);

#endif

 

/************************** Variable Definitions *****************************/

/*

* Device instance definitions

*/

XAxiDma AxiDma;

 

 

/*****************************************************************************/

/*

* The entry point for this example. It invokes the example function,

* and reports the execution status.

*

* @param None.

*

* @return

* - XST_SUCCESS if example finishes successfully

* - XST_FAILURE if example fails.

*

* @note None.

*

******************************************************************************/

int main()

{

XAxiDma_Config *CfgPtr;

int Status;

int Index;

u8 *TxBufferPtr;

u8 Value;

 

xil_printf("\r\nStarting sending data\r\n");

 

TxBufferPtr = (u8 *)TX_BUFFER_BASE;

 

/* Initialize the XAxi Dma device.

*/

CfgPtr = XAxiDma_LookupConfig(DMA_DEV_ID);

if (!CfgPtr) {

xil_printf("No config found for %d\r\n", DMA_DEV_ID);

return XST_FAILURE;

}

 

Status = XAxiDma_CfgInitialize(&AxiDma, CfgPtr);

if (Status != XST_SUCCESS) {

xil_printf("Initialization failed %d\r\n", Status);

return XST_FAILURE;

}

 

if(XAxiDma_HasSg(&AxiDma)){

xil_printf("Device configured as SG mode \r\n");

return XST_FAILURE;

}

 

/* Disable interrupts, we use polling mode

*/

XAxiDma_IntrDisable(&AxiDma, XAXIDMA_IRQ_ALL_MASK,

XAXIDMA_DEVICE_TO_DMA);

 

Value = TEST_START_VALUE;

// Created the TxBuffer. For now it is set to one however it

// can be extended to a larger number

for(Index = 0; Index < MAX_PKT_LEN; Index ++) {

TxBufferPtr[Index] = Value;

 

Value = (Value + 1) & 0xFF;

}

 

/* Flush the SrcBuffer before the DMA transfer, in case the Data Cache

* is enabled

*/

Xil_DCacheFlushRange((UINTPTR)TxBufferPtr, MAX_PKT_LEN);

 

 

//Sets up the DMA-To-Device so that data i send.

Status = XAxiDma_SimpleTransfer(&AxiDma,(UINTPTR) TxBufferPtr,

MAX_PKT_LEN, XAXIDMA_DMA_TO_DEVICE);

 

if (Status != XST_SUCCESS) {

return XST_FAILURE;

}

 

while (XAxiDma_Busy(&AxiDma,XAXIDMA_DMA_TO_DEVICE)) {} //wait

 

xil_printf("\r\nDone sending data\r\n");

/* Test finishes successfully

*/

return XST_SUCCESS;

 

Mensagem editada por: Herivaldo Maia

  • Sign in to reply
  • Cancel
Parents
  • maiatec
    0 maiatec over 6 years ago

    Solved !

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 6 years ago in reply to maiatec

    Great! Can maiatec  elaborate with a sentence or two on how?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • clem57
    0 clem57 over 6 years ago in reply to maiatec

    Great! Can maiatec  elaborate with a sentence or two on how?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube