Skip to main content
gareth
Associate II
December 16, 2008
Question

triggering adc1 from Timer 1 Capture Compare Interupt

  • December 16, 2008
  • 14 replies
  • 2182 views
Posted on December 16, 2008 at 13:27

triggering adc1 from Timer 1 Capture Compare Interupt

    This topic has been closed for replies.

    14 replies

    brianforde9
    Associate III
    May 17, 2011
    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 III
    May 17, 2011
    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...

    gareth
    garethAuthor
    Associate II
    May 17, 2011
    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

    gareth
    garethAuthor
    Associate II
    May 17, 2011
    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