2017-03-23 11:38 AM
The problem is a complier error because in the cube MX (version 4.20.0)
for the STM32F373R8Txusing ADC1 (12 bits ADC) I can choose, in the configuration tab,ADC1 and as external trigger source for regular conversion the TIM4 CC4 event....
this will generate this code:
....
hadc1.Instance = ADC1; hadc1.Init.ScanConvMode = ADC_SCAN_ENABLE; hadc1.Init.ContinuousConvMode = DISABLE; hadc1.Init.DiscontinuousConvMode = ENABLE; hadc1.Init.NbrOfDiscConversion = 8; hadc1.Init.ExternalTrigConv = ADC_EXTERNALTRIGCONV_T4_CC4; <-- compiling this will generate an undefined error ! hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.NbrOfConversion = 8;....in the HAL libary header (version 1.7.0 lates up to date) stm32f3xx_hal_adc_ex.h
at the line 1349 there is: &sharpdefine ADC_EXTERNALTRIGCONV_T4_CC2 ADC_EXTERNALTRIG_T4_CC2at the line 1827 there is: &sharpdefine ADC_EXTERNALTRIG_T4_CC2 ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))Reading at the manual STM32F37xx Reference Manual (RM0313) in the chapter 12.12.3 ADC control register 2 (ADC_CR2) the documentation report:
......
EXTSEL[2:0] External event selector for regular group:the value (bits) 101 that is (ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0)
the manual reports that with this configuration the trigger source should be TIM4 CC4 Event.
.....
is there anybody that can explain this ?
Thank you very much in advance for your help !
Best regards
Leonardo#stm32f373-adc-triggerSolved! Go to Solution.
2017-04-03 5:42 AM
Hi
Volponi.Leonardo
,I would inform you that your reported bug is confirmed and will be fixed in the coming version.
Thank you for bringing this to our attention.
Imen
2017-03-29 9:21 AM
Hi
Volponi.Leonardo
,I want to thank you for your issue report.I will raise it internally and keep you informed with updates.
Imen
2017-04-03 5:42 AM
Hi
Volponi.Leonardo
,I would inform you that your reported bug is confirmed and will be fixed in the coming version.
Thank you for bringing this to our attention.
Imen
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.