AnsweredAssumed Answered

Bug report in cube MX code generation

Question asked by christoph riehl on Feb 16, 2018

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

Outcomes