DMA source address change issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DMA source address change issue

Jump to solution
1,037 Views
aaronwang
NXP Employee
NXP Employee

Hi,

I meet a problem of DMA on S32K312 chip. The application scenario is moving the ADC sampling data to a fixed buffer by DMA.

The ADC1 channel data register address is set as the source address of DMA TCD1 channel, and the buffer address is set as the DMA destination address. But once the ADC sampling is triggered, the DMA source address changes (from 0x400A4118 to 0x400a117), and the CHE_ES register indicates the SAE and DAE errors.

The source address of DMA is configured as fixed address, and there is no place to change the SADDR register, it just changes actumatically.  Please see the attached pictures.

 

0 Kudos
Reply
1 Solution
1,027 Views

Hi Aaron,

After checked the project and called, a preliminary conclusion is as follows:

  • The NBYTES field of DMA TCD1 channel is 0(incorrect value) and the DMA engine start with this value.

frank_yang_1_0-1729667153589.png

  • This resulted in SADDR and DADDR register unexpected behavior then cause the DMA error.  Details:
    • SADDR still decrements by 1 after a DMA minor loop (1 DMA request),although the SMLOE is disable.
    • DADDR add a significant offset(incorrect value) after a minor loop.
  • When setting NBYTES to the correct value, this issue will be solved. You could try it.

But there is a potential issue that the S32K3 RM don`t mentioned DMA behavior pattern like this. 

BR

Frank

View solution in original post

2 Replies
1,028 Views

Hi Aaron,

After checked the project and called, a preliminary conclusion is as follows:

  • The NBYTES field of DMA TCD1 channel is 0(incorrect value) and the DMA engine start with this value.

frank_yang_1_0-1729667153589.png

  • This resulted in SADDR and DADDR register unexpected behavior then cause the DMA error.  Details:
    • SADDR still decrements by 1 after a DMA minor loop (1 DMA request),although the SMLOE is disable.
    • DADDR add a significant offset(incorrect value) after a minor loop.
  • When setting NBYTES to the correct value, this issue will be solved. You could try it.

But there is a potential issue that the S32K3 RM don`t mentioned DMA behavior pattern like this. 

BR

Frank

1,006 Views
aaronwang
NXP Employee
NXP Employee

Hi, Frank

Thank you so much. The issue has been fixed after trying your method. It's really weird the NBYTES setting can impact the SADDR register.

0 Kudos
Reply