diff --git a/cpu/samd21/cpu.c b/cpu/samd21/cpu.c index 0589b4cb1c..75f44bcafa 100644 --- a/cpu/samd21/cpu.c +++ b/cpu/samd21/cpu.c @@ -32,10 +32,8 @@ void cpu_init(void) PM->APBBMASK.reg |= PM_APBBMASK_PORT; /* disable the watchdog timer */ WDT->CTRL.bit.ENABLE = 0; - - /* set pendSV interrupt to lowest possible priority */ - NVIC_SetPriority(PendSV_IRQn, 0xff); - + /* initialize the Cortex-M core */ + cortexm_init(); /* Initialise clock sources and generic clocks */ clk_init(); } diff --git a/cpu/samd21/include/cpu_conf.h b/cpu/samd21/include/cpu_conf.h index 36e586e74d..8597d2201b 100644 --- a/cpu/samd21/include/cpu_conf.h +++ b/cpu/samd21/include/cpu_conf.h @@ -25,29 +25,12 @@ extern "C" { #endif /** - * @name Kernel configuration - * - * TODO: measure and adjust for the cortex-m0 + * @brief ARM Cortex-M specific CPU configuration * @{ */ -#define THREAD_EXTRA_STACKSIZE_PRINTF (512) - -#ifndef THREAD_STACKSIZE_DEFAULT -#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 +#define CPU_DEFAULT_IRQ_PRIO (1U) +#define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn +#define CPU_FLASH_BASE FLASH_ADDR /** @} */ /**