cpu/samd21: adapted to centralized cpu conf

This commit is contained in:
Hauke Petersen 2015-05-27 23:07:23 +02:00
parent 3c48722e0f
commit dfb717c308
2 changed files with 6 additions and 25 deletions

View File

@ -32,10 +32,8 @@ void cpu_init(void)
PM->APBBMASK.reg |= PM_APBBMASK_PORT; PM->APBBMASK.reg |= PM_APBBMASK_PORT;
/* disable the watchdog timer */ /* disable the watchdog timer */
WDT->CTRL.bit.ENABLE = 0; WDT->CTRL.bit.ENABLE = 0;
/* initialize the Cortex-M core */
/* set pendSV interrupt to lowest possible priority */ cortexm_init();
NVIC_SetPriority(PendSV_IRQn, 0xff);
/* Initialise clock sources and generic clocks */ /* Initialise clock sources and generic clocks */
clk_init(); clk_init();
} }

View File

@ -25,29 +25,12 @@ extern "C" {
#endif #endif
/** /**
* @name Kernel configuration * @brief ARM Cortex-M specific CPU configuration
*
* TODO: measure and adjust for the cortex-m0
* @{ * @{
*/ */
#define THREAD_EXTRA_STACKSIZE_PRINTF (512) #define CPU_DEFAULT_IRQ_PRIO (1U)
#define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn
#ifndef THREAD_STACKSIZE_DEFAULT #define CPU_FLASH_BASE FLASH_ADDR
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**
* @name UART0 buffer size definition for compatibility reasons
*
* TODO: remove once the remodeling of the uart0 driver is done
* @{
*/
#ifndef UART0_BUFSIZE
#define UART0_BUFSIZE (128)
#endif
/** @} */ /** @} */
/** /**