32.768 crystal on PC14 and PC15 25 Mhz oscillator on PH0There is also an independent 25Mhz oscillator for the ST-Link processor as well as a 24 Mhz clock for a USB chip.
As a side note, the user button ("wakeup") is on PC13.
the AXI bus (64 bit, high performance) AHB/APB 1,2,3 and 4
AHB = advanced high-speed bus
APB = advanced peripheral bus (lower speed and power)
See the diagram on page 109 for the following
AHB 1 and 2 are in the D2 domain (on a 32 bit AHB matrix)
AHB 3 is in the D1 domain (on a 64 bit AXI bus with flash and axi ram)
AHB 4 is in the D3 domain (looks like a low power mode)
The M7 is in the D1 domain, the M4 is in the D2 domain.
Interestingly the D3 domain can function and transfer data
autonomously while both CPU cores are shut down.
For clocks we have:
HSE - high speed external (our 25 Mhz oscillator) LSE - low speed external (our 32.768 Khz crystal) HSI - high speed internal approx 16 Mhz (could be 8,16,32,64) LSI - low speed internal approx 32K CSI - approx 4 Mhz HSI48 - approx 48 MhzA fellow online said:
The clock tree is complex, but it's no more difficult than driving in a city with multiple intersections. You create different clocks then choose which peripheral (or CPU core) uses which clock. There are tables of different "speed limits". Some PLL internal steps have minimums and maximums, and each peripheral has some maximum.So there are 3 PLL, and you can set them up and use them for different purposes.
stm32h7xx_hal_rcc.c stm32h7xx_hal_rcc_ex.c(These are in XML files with names like "Project.uvprojx" and show paths like:
I ran locate on my linux system and these turned up in a clone of "mbed-os" that I did back in November of 2020. They are at:../../../../../../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c
mbed-os/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_rcc.cThis STM32H7xx_HAL_Driver directory has a vast amount of source code (over 100,000 lines).
** Configure the system clock source if desired. ** Configure the system clock frequency and flash settings ** Configure AHB and APB bus prescalers ** Enable the clock for the desired peripheral(s).Some peripherals are special and have clocks that are not derived from the system clock and need to be set up via clock kernel sources. I don't think the GPIO is among these.
Some more searching leads to:
targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_DISCO_H747I targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/system_clock.cThe file "system_clock.c" is a 209 line C file that makes calls to HAL_RCC routines.
mbed-os/targets/TARGET_STM/README.md
cd /u1/Projects/STM32/Mbed/mbed-os/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI TARGET_STM32H747xI_CM4/TOOLCHAIN_ARM/startup_stm32h747xx.S TARGET_STM32H747xI_CM4/TOOLCHAIN_GCC_ARM/startup_stm32h747xx.S TARGET_STM32H747xI_CM4/TOOLCHAIN_IAR/startup_stm32h747xx.S TARGET_STM32H747xI_CM7/TOOLCHAIN_ARM/startup_stm32h747xx.S TARGET_STM32H747xI_CM7/TOOLCHAIN_GCC_ARM/startup_stm32h747xx.S TARGET_STM32H747xI_CM7/TOOLCHAIN_IAR/startup_stm32h747xx.SThese are generally interesting and give a full list of interrupt vectors. But to stay on topic, take note of the following two lines:
/* Call the clock system intitialization function.*/ bl SystemInitThe game now is to find "SystemInit".
Tom's Computer Info / tom@mmto.org