From 2492e82430fa2016efc4067c0f74495b435eb079 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 16 Apr 2022 21:00:36 +0200 Subject: stm32f7: Add more peripherals. --- rcc/flash.cpp | 2 +- rcc/rcc.cpp | 2 +- rcc/rcc_reg.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'rcc') 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 { -- cgit v1.2.3