2018-02-16 12:57 AM
Hello,
I use the cubemx v4.24.0 in AC6' workbench (windows version) for generating LL ADC code, and the channel selection code seems to be wrong, because it overwrites CHSELR for each selected channel, which ends with only the last channel selected :
Generated code :
/**Configure Regular Channel */ LL_ADC_REG_SetSequencerChannels(ADC1, LL_ADC_CHANNEL_0);/**Configure Regular Channel
*/ LL_ADC_REG_SetSequencerChannels(ADC1, LL_ADC_CHANNEL_1);Correct code would be:
LL_ADC_REG_SetSequencerChannels(ADC1, LL_ADC_CHANNEL_0 | LL_ADC_CHANNEL_1 );
2018-02-16 12:59 AM
Sorry, I forgot to add that this is for the STM32F030, it probably works on other series than F0.