Bug in STM32CubeMX for H753 ADC and work-around.
I have problems porting a H743Zi2 code to a H753. When using the .ioc file editor with the ADC the option to set the ADC clock prescalar is not present for the H753. It is there for the H743. The coeersponding line in the main.c code is not present either. Not surprisingly, a simple test program that was a polled ADC read did not work.
Copying the setup code for the ADC and placing it after /* USER CODE BEGIN ADC1_Init 2 */ and then manually edting in:
hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4; // <-- Missing line
after the line:
hadc1.Instance = ADC1;
was a workaround that worked.
Is there a was to automatically add in such corrections? I need to for my pulse spectroscopy application to poke about quite a bit with the hardware configuration. So it takes a lot of time.
