Page 2 of 2
Re: STM32F100 on STM32VL Discovery - Simple ADC voltage meas
Posted: Wed Nov 19, 2014 8:23 pm
by Giovanni
The reason is clear, it is not getting the DMA interrupt that signals that the conversion is complete. The cause is unknown, I need to make a test but this will have to wait the weekend.
Giovanni
Re: STM32F100 on STM32VL Discovery - Simple ADC voltage meas
Posted: Wed Nov 19, 2014 8:44 pm
by bartocham
Ok!
Thank you very much. I would be appreciated if you could help with that. It is really important project for me.
I'll try to do something by myself but I don't think I could do more

Re: STM32F100 on STM32VL Discovery - Simple ADC voltage meas
Posted: Wed Nov 19, 2014 9:28 pm
by bartocham
As an addition:
In that moment idle task is marked as current, clock task as sleeping and main as suspended.
Re: STM32F100 on STM32VL Discovery - Simple ADC voltage meas
Posted: Wed Nov 19, 2014 10:27 pm
by bartocham
Again me

Mistery solved! Together with my friend which is using ChibiOs with STM32 for almost three years in tons of projects (experience lvl - Asian. If you know what I mean

) we found a bug in config.
Previous one:
Code: Select all
static const ADCConversionGroup adcgrpcfg1 = {
FALSE,
ADC_GRP1_NUM_CHANNELS,
NULL,
NULL,
0, ADC_CR2_SWSTART, /* CR1, CR2 */
ADC_SMPR1_SMP_AN10(ADC_SAMPLE_1P5),
0, /* SMPR2 */
ADC_SQR1_NUM_CH(ADC_GRP1_NUM_CHANNELS),
0, /* SQR2 */
ADC_SQR3_SQ1_N(ADC_CHANNEL_IN5)
};
New one:
Code: Select all
static adcsample_t samples[ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH];
static const ADCConversionGroup adcgrpcfg1 = {
FALSE,
ADC_GRP1_NUM_CHANNELS,
NULL,
NULL,
0, 0, /* CR1, CR2 */
ADC_SMPR1_SMP_AN10(ADC_SAMPLE_1P5),
0, /* SMPR2 */
ADC_SQR1_NUM_CH(ADC_GRP1_NUM_CHANNELS),
0, /* SQR2 */
ADC_SQR3_SQ1_N(ADC_CHANNEL_IN5)
};
For F1 we should not set ADC_CR2_SWSTART. Now everything works.
Thanks for help once again!