Add clock frequency definitions

This commit is contained in:
fruchti 2020-12-26 11:45:20 +01:00
parent 4774d5fbe5
commit ab5b2c61e6
3 changed files with 11 additions and 0 deletions

View file

@ -24,6 +24,10 @@ static void Clock_Init(void)
// Resulting clocks:
// SYSCLK, AHB, APB2 72 Mhz
// APB1, ADC 36 MHz
#if (CLOCK_SYSCLK != 72000000) || (CLOCK_AHB != 72000000) \
|| (CLOCK_APB1 != 36000000) || (CLOCK_APB2 != 72000000)
#error Clock initialisation does not match definitions in clock.h.
#endif
// Disable all interrupts
RCC->CIR = 0x00000000;