Skip to main content
Larry Lukis
Associate II
March 27, 2017
Question

ADC1&3 w/ext trig, bad code from CubeMX w/NucleoF303ZE

  • March 27, 2017
  • 2 replies
  • 1142 views
Posted on March 27, 2017 at 14:15

Start with new CubeMX project, selecting NucleoF303ZE board. Enable 1 single ended channel on each of ADC1 and ADC3. Select Regular Conversion Trigger for both. 

CubeMX generates this line in MX_ADC3_Init():

  hadc3.Init.ExternalTrigConv = ADC_EXTERNALTRIGCONV_EXT_IT11;   // incorrect

IT_11 is incorrect for ADC3, it should be EXT_IT2

  hadc3.Init.ExternalTrigConv = ADC_EXTERNALTRIGCONV_EXT_IT2;   // correct

.ioc file attached.

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    March 27, 2017
    Posted on March 27, 2017 at 15:53

    Hi,

    Which CubeMx version are you using ? I will check this case then come back to you.

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Larry Lukis
    Associate II
    March 27, 2017
    Posted on March 27, 2017 at 16:17

    4.20.0

    Thanks,

    Larry

    Technical Moderator
    March 29, 2017
    Posted on March 29, 2017 at 18:01

    Thank you Larry for your reported issue. I raised this error internally to our CubeMx team.

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Sirma Siang
    ST Employee
    August 24, 2017
    Posted on August 24, 2017 at 15:46

    Hello

    Lukis.Larry

    ,

    I would like to thank you for your feedback.

    I confirm you that the correction will be in CubeMX 4.

    Kind regards

    Sirma