1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

cpu/stm32f4: adapted to centralized cpu conf

This commit is contained in:
Hauke Petersen 2015-05-27 23:08:11 +02:00
parent c6d65fec8b
commit 79d9391d3b
2 changed files with 10 additions and 38 deletions

View File

@ -21,10 +21,6 @@
#include "cpu.h"
#include "periph_conf.h"
/**
* @name Pattern to write into the Coprocessor Access Control Register to allow full FPU access
*/
#define FULL_FPU_ACCESS (0x00f00000)
static void cpu_clock_init(void);
@ -34,17 +30,10 @@ static void cpu_clock_init(void);
*/
void cpu_init(void)
{
/* give full access to the FPU */
SCB->CPACR |= (uint32_t)FULL_FPU_ACCESS;
/* configure the vector table location to internal flash */
SCB->VTOR = FLASH_BASE;
/* initialize the Cortex-M core */
cortexm_init();
/* initialize the clock system */
cpu_clock_init();
/* set pendSV interrupt to lowest possible priority */
NVIC_SetPriority(PendSV_IRQn, 0xff);
}
/**

View File

@ -21,36 +21,23 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#ifdef CPU_MODEL_STM32F407VG
#if defined(CPU_MODEL_STM32F407VG)
#include "stm32f407xx.h"
#elif defined CPU_MODEL_STM32F415RG
#elif defined(CPU_MODEL_STM32F415RG)
#include "stm32f415xx.h"
#endif
/**
* @name Kernel configuration
*
* TODO: measure and adjust for the Cortex-M4f
* @{
*/
#define THREAD_EXTRA_STACKSIZE_PRINTF (2500)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (2500)
#ifdef __cplusplus
extern "C" {
#endif
#define THREAD_STACKSIZE_IDLE (512)
/** @} */
/**
* @name UART0 buffer size definition for compatibility reasons
*
* TODO: remove once the remodeling of the uart0 driver is done
* @brief ARM Cortex-M specific CPU configuration
* @{
*/
#ifndef UART0_BUFSIZE
#define UART0_BUFSIZE (128)
#endif
#define CPU_DEFAULT_IRQ_PRIO (1U)
#define CPU_IRQ_NUMOF (82U)
#define CPU_FLASH_BASE FLASH_BASE
/** @} */
/**
@ -68,10 +55,6 @@
#endif
/** @} */
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif