Bugreport: CubeMX makes incomplete GPIO Init of ADC2,3,4 at STM32G474RE
- September 13, 2019
- 2 replies
- 802 views
Hi,
I am working with my students on a GaN Amplifier. The HRTIM makes the PWM, while the ADCs 1,2,3,4 are converting 2 analog signals each with their injected channels. The ADCs are triggered by an event of the HRTIM with 1MHz.
I have created the code using STM32 Cube MX Version 5.3.0. The Toolchain is MDK ARM V5.
Result:
The GPIO Pins of ADC1 are generated correctly. But in the initialization code MX_ADC2_Init(); MX_ADC3_Init(); and MX_ADC4_Init(); of ADC 2,3,4 I am missing the initialization of the GPIO Pins.
I have added the project as a zip file (except the driver files), please have a look at Gan_Amp_V1.ioc and /src/Adc.c.
Second thing:
The microcontroller STM32G474 runs with 170 MHz but the ADC is limited to 60 MHz.
The Clock generation of the ADC must be done hand coded.
In the Cube there is a tab for the clock tree. I suggest that you should place the ADC clock deinition in this tab.
In addition there should be a warining if yout overclock the ADCs.
Thanks,
Karl-Dieter Tieste
