cancel
Showing results for 
Search instead for 
Did you mean: 

triggering adc1 from Timer 1 Capture Compare Interupt

gareth
Associate II
Posted on December 16, 2008 at 13:27

triggering adc1 from Timer 1 Capture Compare Interupt

14 REPLIES 14
brianforde9
Associate II
Posted on May 17, 2011 at 12:51

I'm out of ideas. The only otehr difference I can see between yours and mine, is wherer I call ADC_DMACmd(). I don't call it until after the calibration is complete.

Try triggering a single conversion only

ADC_DeInit(ADC1);

lsADC_InitStruct.ADC_Mode = ADC_Mode_Independent;

lsADC_InitStruct.ADC_ScanConvMode = DISABLE;

lsADC_InitStruct.ADC_ContinuousConvMode = DISABLE;

lsADC_InitStruct.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T1_CC3;

lsADC_InitStruct.ADC_DataAlign = ADC_DataAlign_Right;

lsADC_InitStruct.ADC_NbrOfChannel = 1;

ADC_Init(ADC1, &lsADC_InitStruct);

ADC_RegularChannelConfig(ADC1,ADC_Channel_0, 1,ADC_SampleTime_55Cycles5);

etc...

brianforde9
Associate II
Posted on May 17, 2011 at 12:51

Site wont let me attach C file, but I could attach a gzip file. Go figure...

Brian F.

brianforde9
Associate II
Posted on May 17, 2011 at 12:51

Gareth,

You are correct of course. The second call to ADC_Cmd() is not necessary when you are using an external trigger (as I have discovered). Either ADON -or- external trigger is required.

Brian F.

gareth
Associate II
Posted on May 17, 2011 at 12:51

Cheers for your help Brian.

I shall look into this further today and get back to you

gareth
Associate II
Posted on May 17, 2011 at 12:51

Hi all, sorry for the very late reply on this topic. I finaly found a solution/the problem a few weeks back. It seems that on the MCBSTM32E eval board not all the GPIO pins are physicaly connected to their labelled pads. This was the case with the interupt line i was attempting to use and hence the issue.

Hope that helps