further ivt and isr implementation
[cortex-from-scratch] / clock.c
1 #include <stdbool.h>
2 #include <stddef.h>
3 #include <stdint.h>
4 #include <stm32.h>
5 #include <mmap.h>
6
7
8 void clock_init() {
9
10
11       *RCC_CR = *RCC_CR | 0x00010000;
12       for (int i = 0; i < 200; i++) {
13       }
14       *RCC_CFGR = *RCC_CFGR | 0x05000001;
15 }