ADC insert values in wrong variables throught DMA

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ADC insert values in wrong variables throught DMA

1,032件の閲覧回数
darkWarrior735
Contributor I

I'm using MKL25Z4 in order to use ADC to make 1024 samples that wiil go to an array in memory by using the DMA. After that I press a button and change it so that the DMA will send the samples for DAC and I encounter some problems:

  • For some reason it stops filling the array with samples after cell number 911 even thought I configured it for circular buffer of 2KB, why it stopped after cell 912 ?
  • It looks like after the cell 911 changes the DMA insert a sample from the ADC to one off my global variables, one named state which defines if I need the ADC or the DAC, all the other global variables are untouched, which effect my program, how can it be?
  • I see that some configurations make the CPU work while the DMA work , like the Auto-Aligened, why?
    I will appricate every answer or tip
ラベル(1)
0 件の賞賛
返信
1 返信

1,001件の閲覧回数
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @darkWarrior735,

In the following link there's an example that uses the DMA ADC, also, in the SDK there's an example in demo_apps examples.

Best Regards,

Alexis Andalon

0 件の賞賛
返信