Skip to content

Commit

Permalink
s32k3xx:edma [s|d]last needs to be total xfer size
Browse files Browse the repository at this point in the history
  • Loading branch information
davids5 committed May 20, 2023
1 parent fc1d16b commit 615b460
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/arm/src/s32k3xx/s32k3xx_edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,9 @@ static inline void s32k3xx_tcd_configure(struct s32k3xx_edmatcd_s *tcd,
EDMA_TCD_ATTR_DMOD(config->dmod);
#endif
tcd->nbytes = config->nbytes;
tcd->slast = config->flags & EDMA_CONFIG_LOOPSRC ? -config->iter : 0;
tcd->slast = config->flags & EDMA_CONFIG_LOOPSRC ?
-(config->iter * config->nbytes) : 0;

tcd->daddr = config->daddr;
tcd->doff = config->doff;
tcd->citer = config->iter & EDMA_TCD_CITER_MASK;
Expand All @@ -625,7 +627,9 @@ static inline void s32k3xx_tcd_configure(struct s32k3xx_edmatcd_s *tcd,
0 : EDMA_TCD_CSR_DREQ;
tcd->csr |= config->flags & EDMA_CONFIG_INTHALF ?
EDMA_TCD_CSR_INTHALF : 0;
tcd->dlastsga = config->flags & EDMA_CONFIG_LOOPDEST ? -config->iter : 0;
tcd->dlastsga = config->flags & EDMA_CONFIG_LOOPDEST ?
-(config->iter * config->nbytes) : 0;


Check failure on line 633 in arch/arm/src/s32k3xx/s32k3xx_edma.c

View workflow job for this annotation

GitHub Actions / check

Too many blank lines
#ifdef CONFIG_S32K3XX_DTCM_HEAP
/* Remap address to backdoor address for eDMA */
Expand Down

0 comments on commit 615b460

Please sign in to comment.