2016-09-28 01:11 AM
I'm using STM32F301C8microcontroller in my project. I use STM32Cube for init code generation.In ADC init part i configured injected channels to be externallytriggered from TIM2.
After code generation i tried to build the project in IAR but i got an error:
Error[Pe020]: identifier ''ADC_EXTERNALTRIGINJECCONV_T2_TRGO'' is undefined...
Isit caused from a STM32Cube error or doesn't STM32F301C8microcontrollers ADCs injected channels have a feature of beingexternally triggered from TIM2.
Regards;
Omer
#stm32cubeSolved! Go to Solution.
2017-01-16 03:09 AM
Hello
‌,Your request is fixed in the new release of STM32CubeF3 V1.7.0:
ADC_EXTERNALTRIGINJECCONV_T2_TRGO is defined for STM32F301x8.
Thanks for bringing this issue to our attention.
Regards
Imen
2016-09-28 02:33 AM
Hello,
To have more insight into ADC applications, I recommend you to check the ADC example in the STM32CubeF3: STM32Cube_FW_F3_V1.6.0\Projects\STM32303E_EVAL\Examples\ADC\ADC_TriggerModeThis example describes how to use the ADC and TIM2 to convert continuously data from ADC channel. So, compare the provided code there with your code to figure out what is missed there.Ensure that you have correctly configure both ADC and Timer. Then, share your code if this issue is not resolved.This may help you, in section 12 Analog-to-digital converters (ADC) and Table 34. ADC1 - External trigger for injected channels.Regards2016-09-28 03:02 AM
I checked some examples about it. But all examples are about STM32F303 series and everything is OK about it. My question is about STM32F301 series microcontrollers.
In stm32f3xx_hal_adc_ex.h header, ADC_EXTERNALTRIGINJECCONV_T2_TRGO isn't defined when the microcontroller is defined as STM32F301x8. This is because of #if preprocessors. When i look at the ref. manual it says TIM2 is available for external triggering for STM32F301 but it is not defined in the header file. So i'm not sure if STM32F301 injected ADC channels can be externally triggered from TIM2 or not2016-09-28 05:17 AM
Hi,
I checked this case and I confirm this issue.Regards2016-09-28 07:40 AM
Hi yaman.omer.002,
Thanks for highlighting this issue. It is reported internally to be fixed in coming versions.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2017-01-16 03:09 AM
Hello
‌,Your request is fixed in the new release of STM32CubeF3 V1.7.0:
ADC_EXTERNALTRIGINJECCONV_T2_TRGO is defined for STM32F301x8.
Thanks for bringing this issue to our attention.
Regards
Imen