Skip to content

Commit

Permalink
axicdma: examples: Reset error and done states before starting DMA
Browse files Browse the repository at this point in the history
In SG interrupt example, reset error and done global states before
starting each DMA transaction. In the peripheral test, there could
be a scenario that axi_cdma_0 test fails, modifies these global
states and report an error. Next axi_cdma_1 test executes and
passes but if global states are not reset it will report false
error which should be fixed.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>

Acked-for-series: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
  • Loading branch information
radheyxilinx authored and saddepal committed Oct 4, 2018
1 parent 5e68393 commit 394e44f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
* and typecasting buffer address(CR-995116).
* 4.5 rsp 03/10/18 Fix compilation error in CheckData function when DEBUG
* mode is enabled.
* Reset error and done states before starting the DMA.
* </pre>
*
****************************************************************************/
Expand Down Expand Up @@ -852,6 +853,9 @@ int XAxiCdma_SgIntrExample(XScuGic *IntcInstancePtr, XAxiCdma *InstancePtr,
*/
XAxiCdma_IntrEnable(InstancePtr, XAXICDMA_XR_IRQ_ALL_MASK);

Done = 0;
Error = 0;

/* Start the DMA transfer
*/
Status = DoTransfer(InstancePtr);
Expand Down

0 comments on commit 394e44f

Please sign in to comment.