Loading...
Searching...
No Matches
config.h
1/********************************************
2 * STM32F439 *
3 * Configuration Options *
4 * Author: Dr. Glenn Matthews *
5 * Edited By: Matthew Pulis *
6 * Header File *
7 ********************************************/
8
9/* Define to prevent recursive inclusion -------------------------------------*/
10// ALLOW FORMATTING
11#ifndef __MISC_CONFIG_H__
12#define __MISC_CONFIG_H__
13
14// External Memory Interface
15// #define DATA_IN_ExtSDRAM // Uncomment this line if an external memory interface is required (SDRAM).
16#define SDRAM_BANK_1 0x10
17
18// Clock Configuration - External Crystal
19#define HSE_STARTUP_TIMEOUT ((uint16_t)0x0500)
20#define LSE_STARTUP_TIMEOUT (unsigned int)500
21
22// 168 MHz Core, 25 MHz External
23#define HSE_VALUE (unsigned int)25000000 // Default value of the External oscillator in Hz
24#define HSI_VALUE (unsigned int)16000000 // Value of the internal oscillator in Hz.
25#define PLL_M 25
26#define PLL_N 336
27#define PLL_P 2 // SYSCLK = PLL_VCO / PLL_P
28#define PLL_Q 7 // USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ
29
30#define HSE_USED 1
31
32// Used to adjust the frequency of the internal clock
33#define HSITRIM 0
34#define HSICAL 0
35
36#define HSIPLL_M 16
37#define HSIPLL_N 336
38#define HSIPLL_P 2 // SYSCLK = PLL_VCO / PLL_P
39#define HSIPLL_Q 7 // USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ
40
41// Processor specific defines to allow access to some of the HAL libraries.
42#define STM32F439 1
43#define STM32F439xx 1
44
45// Interrupt Vector Table Offset (Uncomment if in RAM)
46// #define VECT_TAB_SRAM
47#define VECT_TAB_OFFSET 0x00
48
49// Configuration for real-time clock
50// #define RTC_ENABLE 0
51
52#endif