cancel
Showing results for 
Search instead for 
Did you mean: 

Bug report in cube MX code generation

christoph riehl
Associate II
Posted on February 16, 2018 at 09:57

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 );

1 REPLY 1
christoph riehl
Associate II
Posted on February 16, 2018 at 09:59

Sorry, I forgot to add that this is for the STM32F030, it probably works on other series than F0.