ADC conversion + Analog Watch Dog
Posted: Fri Mar 11, 2016 6:16 am
moved from the my previous topic
Same problem, another way
this conversion group:
and this call conversion
if ADC_WDG_BUFDEPTH == 0, call adcerr_wdg, but not store results of conversion, (clear, ok)
if ADC_WDG_BUFDEPTH > 0, store results of conversion, but not call adcerr_wdg (why?) at the same conditions
I want both actions: store results of conversion, and call adcerr_wdg - this is possible?
clear up the point: I am interested in: store result of conversion at channel8 once of certain time period,
and check ranges of signal at channel9 during whole this period
PS: Device STM32F373C8T6, board- self made, OS - NIL from ChibiOs v3.0
PPS: Sorry for my Engish ...
thank you very much for you tolerance
Same problem, another way
this conversion group:
Code: Select all
static const ADCConversionGroup adc_cfg_wdg2 = {
FALSE,
2,
NULL,
adcerr_wdg,
.u.adc = {
ADC_CR1_AWDEN | ADC_CR1_AWDIE | ADC_CR1_AWDSGL | ADC_CR1_AWDCH_0 | ADC_CR1_AWDCH_3,
ADC_CR2_SWSTART | ADC_CR2_CONT,
NEGATIVE_VOLTAGE_LIMIT,
POSITIVE_VOLTAGE_LIMIT,
{ 0, ADC_SMPR2_SMP_AN8(ADC_SAMPLE_1P5) | ADC_SMPR2_SMP_AN9(ADC_SAMPLE_1P5)},
{ 0, 0, ADC_SQR3_SQ2_N(ADC_CHANNEL_IN8) | ADC_SQR3_SQ1_N(ADC_CHANNEL_IN9)}}}; and this call conversion
Code: Select all
adcStartConversionI(&ADCD1, &adc_cfg_wdg2, buf, ADC_WDG_BUFDEPTH);
if ADC_WDG_BUFDEPTH == 0, call adcerr_wdg, but not store results of conversion, (clear, ok)
if ADC_WDG_BUFDEPTH > 0, store results of conversion, but not call adcerr_wdg (why?) at the same conditions
I want both actions: store results of conversion, and call adcerr_wdg - this is possible?
clear up the point: I am interested in: store result of conversion at channel8 once of certain time period,
and check ranges of signal at channel9 during whole this period
PS: Device STM32F373C8T6, board- self made, OS - NIL from ChibiOs v3.0
PPS: Sorry for my Engish ...
thank you very much for you tolerance