adc time conversion
hi everybody,
i 'm setting the ADC on STM32L051x6.
it works correctly but i have problem with conversion time. It is about 8us. To measure it i'm using a signal that is setted high at the start of conversion and low at the end of conversion.
The start of conversion is triggered on a timer event and i use
LL_GPIO_SetOutputPin(GPIOA, PA6);
to set signal.
I'm tryng to reduce this time.
Can somebody help me?
this is the setting code for ADC
void LED_CURRENT_ADC_Init(void)
{LL_ADC_SetClock(ADC1, LL_ADC_CLOCK_SYNC_PCLK_DIV1);
LL_ADC_SetSamplingTimeCommonChannels(ADC1, LL_ADC_SAMPLINGTIME_1CYCLE_5); LL_ADC_SetResolution(ADC1, LL_ADC_RESOLUTION_12B); LL_ADC_SetDataAlignment(ADC1, LL_ADC_DATA_ALIGN_RIGHT); LL_ADC_REG_SetSequencerChannels(ADC1, LL_ADC_CHANNEL_3); LL_ADC_REG_SetContinuousMode(ADC1, LL_ADC_REG_CONV_SINGLE); LL_ADC_ClearFlag_ADRDY(ADC1); LL_ADC_EnableIT_EOC(ADC1); LL_ADC_Enable(ADC1);}
this is the adc IRQ
void ADC1_COMP_IRQHandler(void)
{LL_ADC_ClearFlag_EOC(ADC1);
LL_GPIO_ResetOutputPin(SENS_LINEVALID_CPLD_PROGn_PORT, SENS_LINEVALID_CPLD_PROGn_PIN);
}
#conversion #adc-sampling-time