Skip to main content
christoph riehl
Associate
February 16, 2018
Question

Bug report in cube MX code generation

  • February 16, 2018
  • 1 reply
  • 540 views
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 );

    This topic has been closed for replies.

    1 reply

    christoph riehl
    Associate
    February 16, 2018
    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.