Main Site Documentation

STM32F4 (Cerberus) and Porting kit


#1

I’m starting to take a look inside STM32 firmware and I want to try porting to other board with STM32F4 chip. For first attempt, I need to change clock setup settings, just for didactic use.
Where is the oscillator setting ?
Normally in CMSIS it is in system_stm32f4xx.c , but I found a definition in STM32F4_template_selector.h that is set to 8Mhz … is that the right place ?



//
// processor and features
//
/////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////
//
// constants
//

// legal SYSCLK: 24, 30, 32, 36, 40, 42, 48, 54, 56, 60, 64, 72, 84, 96, 108, 120, 144, 168MHz
 #define SYSTEM_CLOCK_HZ                 168000000  // 168MHz
 #define SYSTEM_CYCLE_CLOCK_HZ           168000000  // 168MHz
 #define SYSTEM_APB1_CLOCK_HZ            42000000   // 42MHz
 #define SYSTEM_APB2_CLOCK_HZ            84000000   // 84MHz
 #define SYSTEM_CRYSTAL_CLOCK_HZ         8000000    // 8MHz external clock
 #define SUPPLY_VOLTAGE_MV               3300       // 3.3V supply


thank you


#2

No. Look in the platform selector h file in the solution folder.


#3

@ jay - Great !
Thanks

I’m using Keil MDK and I get correct compilation and all file needed.
Any advise using Keil MDK 4.60 ?