S32K312 ADC dma transfer setting

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K312 ADC dma transfer setting

1,287 次查看
jichengyou
Contributor I

I wanted to use the S32K312 to configure three or four ADC channels and DMA them into an array, expecting the first three or four elements of the array to represent the ADC values of each channel, but no matter how I set it, I couldn't get the results I wanted. Please tell me how I can set the signed offset of DMA source and destination. last address adjustment, transfer size and modulo and minor loop size major loop count.

The following attachments and pictures are my setup pictures and works (four ADCs).

 

我想使用S32K312配置三个或者四个ADC通道,并使用DMA搬运到一个数组中,期望的是数组中的前三个或者四个元素分别代表各个通道的ADC值,但是无论怎么设置都无法得到想要的结果。请告诉我我该如何设置DMA的 source和destination的signed offset ,last address adjustment, transfer size 和 modulo 和minor loop size major loop count。

以下附件是我的设置图片和工程(四个ADC)。

jichengyou_0-1732844310160.png

jichengyou_1-1732844345426.png

jichengyou_2-1732844367482.png

 

 

 

 

0 项奖励
回复
1 回复

1,234 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

driver is setting up DMA channel in case RXFIFO is used, user need to only enable global DMA config and point to right DMA callback. I did a few modification in setting as below and with attached main.c results are updating.
PetrS_4-1732885095486.pngPetrS_5-1732885103053.pngPetrS_6-1732885111168.pngPetrS_7-1732885118539.png

 

Hope it helps.

 
BR, Petr
0 项奖励
回复