diff options
Diffstat (limited to 'os/kernel')
-rw-r--r-- | os/kernel/ports/ARMCMx/chcore_v7m.h | 8 | ||||
-rw-r--r-- | os/kernel/ports/ARMCMx/devices/STM32F30x/systick.h | 22 |
2 files changed, 5 insertions, 25 deletions
diff --git a/os/kernel/ports/ARMCMx/chcore_v7m.h b/os/kernel/ports/ARMCMx/chcore_v7m.h index 0fc220a34..22f81d00a 100644 --- a/os/kernel/ports/ARMCMx/chcore_v7m.h +++ b/os/kernel/ports/ARMCMx/chcore_v7m.h @@ -429,14 +429,10 @@ static inline void port_init(void) { DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
/* Initialization of the system vectors used by the port.*/
+#if !CORTEX_SIMPLIFIED_PRIORITY
NVIC_SetPriority(SVCall_IRQn, CORTEX_PRIORITY_SVCALL);
- NVIC_SetPriority(PendSV_IRQn, CORTEX_PRIORITY_PENDSV);
-
-#if CH_CFG_TIMEDELTA > 0
- /* TODO: Remove initialization, all the timers handling has to be performed
- outside the port layer.*/
- port_timer_init();
#endif
+ NVIC_SetPriority(PendSV_IRQn, CORTEX_PRIORITY_PENDSV);
}
/**
diff --git a/os/kernel/ports/ARMCMx/devices/STM32F30x/systick.h b/os/kernel/ports/ARMCMx/devices/STM32F30x/systick.h index 7e036ff3c..3b143780d 100644 --- a/os/kernel/ports/ARMCMx/devices/STM32F30x/systick.h +++ b/os/kernel/ports/ARMCMx/devices/STM32F30x/systick.h @@ -26,8 +26,8 @@ * @{
*/
-#ifndef _CHTIMER_H_
-#define _CHTIMER_H_
+#ifndef _SYSTICK_H_
+#define _SYSTICK_H_
/*===========================================================================*/
/* Module constants. */
@@ -58,22 +58,6 @@ /*===========================================================================*/
/**
- * @brief Timer unit initialization.
- *
- * @notapi
- */
-static inline void port_timer_init(void) {
-
- TIM2->ARR = 0xFFFFFFFF;
- TIM2->CCMR1 = 0;
- TIM2->CCR1 = 0;
- TIM2->DIER = 0;
- TIM2->CR2 = 0;
- TIM2->EGR = TIM_EGR_UG;
- TIM2->CR1 = TIM_CR1_CEN;
-}
-
-/**
* @brief Returns the system time.
*
* @return The system time.
@@ -151,6 +135,6 @@ static inline systime_t port_timer_get_alarm(void) { return TIM2->CCR1;
}
-#endif /* _CHTIMER_H_ */
+#endif /* _SYSTICK_H_ */
/** @} */
|