summaryrefslogtreecommitdiff
path: root/rcc
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2022-04-16 21:00:36 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2022-04-16 21:09:52 +0200
commit2492e82430fa2016efc4067c0f74495b435eb079 (patch)
treeb447b326ce86b0b23e5e71533a71f7b748a1204a /rcc
parentd6c95a111c0950757d75496af254e3427e3769b6 (diff)
stm32f7: Add more peripherals.
Diffstat (limited to 'rcc')
-rw-r--r--rcc/flash.cpp2
-rw-r--r--rcc/rcc.cpp2
-rw-r--r--rcc/rcc_reg.h3
3 files changed, 5 insertions, 2 deletions
diff --git a/rcc/flash.cpp b/rcc/flash.cpp
index 988764f..e1bdfd3 100644
--- a/rcc/flash.cpp
+++ b/rcc/flash.cpp
@@ -9,7 +9,7 @@ void flash_init() {
// Set flash latency.
FLASH->ACR = 0x12;
- #elif defined(STM32F4)
+ #elif defined(STM32F4) || defined(STM32F7)
// Set flash latency.
FLASH->ACR = 0x107;
diff --git a/rcc/rcc.cpp b/rcc/rcc.cpp
index 67bb948..ed42082 100644
--- a/rcc/rcc.cpp
+++ b/rcc/rcc.cpp
@@ -118,7 +118,7 @@ void rcc_init() {
#endif
}
-#if defined(STM32F4)
+#if defined(STM32F4) || defined(STM32F7)
void rcc_init(uint32_t osc_mhz, uint32_t sysclk_mhz) {
// Initialize flash.
flash_init();
diff --git a/rcc/rcc_reg.h b/rcc/rcc_reg.h
index 2612580..d5f8b68 100644
--- a/rcc/rcc_reg.h
+++ b/rcc/rcc_reg.h
@@ -85,6 +85,9 @@ struct RCC_reg_f4_t {
volatile uint32_t _2;
volatile uint32_t SSCGR;
volatile uint32_t PLLI2SCFGR;
+ volatile uint32_t PLLSAICFGR;
+ volatile uint32_t DCKCFGR1;
+ volatile uint32_t DCKCFGR2;
};
struct RCC_reg_l0_t {