cancel
Showing results for 
Search instead for 
Did you mean: 

For STM32F301K6Ux, ADC1 can be configured to trigger off of Timer 2 Capture Compare 2 Event but ADC_EXTERNALTRIGCONVEDGE_RISING is left undefined for this processor. (Edit: meant ADC_EXTERNALTRIGCONV_T2_CC2)

6 REPLIES 6

This appears to be a Cube-specific symbol, defined in [CubeF3]\Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_adc_ex.h , Do you have this header included in your source files?

JW

I apologize, I meant "ADC_EXTERNALTRIGCONV_T2_CC2" is not defined. In stm32f3xx_hal_adc_ex.h, it is defined

#if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx)
/* List of external triggers with generic trigger name, sorted by trigger     */
/* name:                                                                      */
 
/* External triggers of regular group for ADC1 */
#define ADC_EXTERNALTRIGCONV_T1_CC1         ADC1_EXTERNALTRIG_T1_CC1
#define ADC_EXTERNALTRIGCONV_T1_CC2         ADC1_EXTERNALTRIG_T1_CC2
#define ADC_EXTERNALTRIGCONV_T1_CC3         ADC1_EXTERNALTRIG_T1_CC3
#define ADC_EXTERNALTRIGCONV_EXT_IT11       ADC1_EXTERNALTRIG_EXT_IT11
#define ADC_EXTERNALTRIGCONV_T1_TRGO        ADC1_EXTERNALTRIG_T1_TRGO
#define ADC_EXTERNALTRIGCONV_T1_TRGO2       ADC1_EXTERNALTRIG_T1_TRGO2
#define ADC_EXTERNALTRIGCONV_T2_TRGO        ADC1_EXTERNALTRIG_T2_TRGO
#define ADC_EXTERNALTRIGCONV_T6_TRGO        ADC1_EXTERNALTRIG_T6_TRGO
#define ADC_EXTERNALTRIGCONV_T15_TRGO       ADC1_EXTERNALTRIG_T15_TRGO
#define ADC_SOFTWARE_START                  (0x00000001U)
#endif /* STM32F301x8 || STM32F302x8 || STM32F318xx */

But in CubeMX, you can select ADC_EXTERNALTRIGCONV_T2_CC2 which leads to an "undefined" error.

OK so this appears to be a CubeMX-specific problem, correct?

@Khouloud ZEMMELI​ can you please have a look at this? Thanks.

JW

Khouloud ZEMMELI
ST Employee

​Hello @Patrick Chwalek​ , Could you please share your ioc file ? need to know the MX version.

Best Regards,

Khouloud

​Thanks Patrick for the feedback, this will be internally checked.

Best Regards,

Khouloud.

Sure thing! (See attached).

Best,

Patrick