diff --git a/arch/arm/src/s32k3xx/s32k3xx_edma.c b/arch/arm/src/s32k3xx/s32k3xx_edma.c index b4c05f299d..9c94b76f80 100644 --- a/arch/arm/src/s32k3xx/s32k3xx_edma.c +++ b/arch/arm/src/s32k3xx/s32k3xx_edma.c @@ -1479,12 +1479,13 @@ unsigned int s32k3xx_dmach_getcount(DMACH_HANDLE *handle) if ((regval16 & EDMA_TCD_CITER_ELINK) != 0) { - remaining = (regval16 & EDMA_TCD_CITER_MASK) >> + remaining = (regval16 & EDMA_TCD_CITER_MASK_ELINK) >> EDMA_TCD_CITER_SHIFT; } else { - remaining = 1; + remaining = (regval16 & EDMA_TCD_CITER_MASK) >> + EDMA_TCD_CITER_SHIFT; } }