ADC2 with two triggers

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

ADC2 with two triggers

563 次查看
Andy_h
Contributor II

Hello,

i'm struggeling with the adc_etc.  and have 2 questions:

1)

I want to use two different external triggers for two different Lpadc2 channels on the rt1176.

Therefor i want to use the following config:

PIT1_Channel 0 -> XBAR1_OutputAdc1coco0 -> adc trigger4 (working with IRQ0, Triggermask4)

PIT1_Channel2 -> XBAR_OutputAdc1coco1 -> adc trigger5 (working with IRQ,Triggermask5)

the adc trigger4 path works when use stand alone, but when i add the function:

PIT_StartTimer(DEMO_PIT_BASE, kPIT_Chnl_2) after the PIT_StartTimer(TEST_PIT_BASE, kPIT_Chnl_0) function, the adc doesn't work anymore.

 

Do the PIT Outputs blocking each other?

2)

When i just want 2 seperate channels working independently, do i even need a trigger chain? The Problem is that the trigger chain doesnt work with ADC2, i just get the correct result for the first one but the second is always 0. When i switch the DEMO_USER_CHANNEL to the second line, it is the direct opposite. Very confusing because it works with ADC1.

 

Could you share a working demo code with lpadc2 and adc_etc? it is very confusing that it works on one channel seperatly but not on two. I used the demo example. I get even Conversion 1 correct and conversion2 zero or vice versa...

thanks in advance,

Andy

 

 

0 项奖励
回复
0 回复数