2022-05-26 06:43 AM
I have set the clock for the ADC to 51.2MHz by PLL2P with the DIV set as seen below. Without reprogramming the STM32H7A3 I would like to change DIVN2 to x16 and DIVP2 to /32 to give me 4MHz clock to the ADC, but I can not seem to find where these are set in the code.
I Have checked the auto-generated code within main.c and there are no options for x32 and /5. Are DIVN2 and DIVP2 set outside of main.c, and if so where?
Also is there anything else I need to know/do when changing the clock division via the code?
Thank you for any help
Current clock configuration that is uploaded to the microcontroller, but DIVN2 and DIVP2 will needed to be changed.
Solved! Go to Solution.
2022-05-27 07:34 AM
Thank you Jiangfan.
Just to let you know it is not added to a generated project by default and I had to copy it from the repository. If I regenerate the project with the STM32CubeIDE it does remove these files. I'm not sure if that is what is meant to happen
Thank you for your help and links!
2022-05-27 07:34 AM
Thank you!