mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards: efm32 boards, LETIMER + regular timer
This commit is contained in:
parent
cbf78fe3d4
commit
a3de88a4db
@ -147,7 +147,8 @@ static const timer_conf_t timer_config[] = {
|
||||
.dev = TIMER1,
|
||||
.cmu = cmuClock_TIMER1
|
||||
},
|
||||
.irq = TIMER1_IRQn
|
||||
.irq = TIMER1_IRQn,
|
||||
.channel_numof = 3
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -34,12 +34,15 @@ extern "C" {
|
||||
* The timer runs at 250 kHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
|
||||
#define XTIMER_DEV (TIMER_DEV(1))
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#else
|
||||
#define XTIMER_DEV (TIMER_DEV(0))
|
||||
#define XTIMER_HZ (250000UL)
|
||||
#endif
|
||||
#define XTIMER_WIDTH (16)
|
||||
#define XTIMER_CHAN (0)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -85,19 +85,6 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn
|
||||
}
|
||||
};
|
||||
#define TIMER_0_ISR isr_letimer0
|
||||
|
||||
#else
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.prescaler = {
|
||||
@ -108,12 +95,25 @@ static const timer_conf_t timer_config[] = {
|
||||
.dev = TIMER1,
|
||||
.cmu = cmuClock_TIMER1
|
||||
},
|
||||
.irq = TIMER1_IRQn
|
||||
}
|
||||
.irq = TIMER1_IRQn,
|
||||
.channel_numof = 3
|
||||
},
|
||||
{
|
||||
.prescaler = {
|
||||
.dev = NULL,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn,
|
||||
.channel_numof = 2
|
||||
},
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
#define TIMER_1_ISR isr_letimer0
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -35,12 +35,15 @@ extern "C" {
|
||||
* The timer runs at 250 KHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
|
||||
#define XTIMER_DEV (TIMER_DEV(1))
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#else
|
||||
#define XTIMER_DEV (TIMER_DEV(0))
|
||||
#define XTIMER_HZ (250000UL)
|
||||
#endif
|
||||
#define XTIMER_WIDTH (16)
|
||||
#define XTIMER_CHAN (0)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -145,19 +145,6 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn
|
||||
}
|
||||
};
|
||||
#define TIMER_0_ISR isr_letimer0
|
||||
|
||||
#else
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.prescaler = {
|
||||
@ -168,12 +155,25 @@ static const timer_conf_t timer_config[] = {
|
||||
.dev = TIMER1,
|
||||
.cmu = cmuClock_TIMER1
|
||||
},
|
||||
.irq = TIMER1_IRQn
|
||||
}
|
||||
.irq = TIMER1_IRQn,
|
||||
.channel_numof = 3
|
||||
},
|
||||
{
|
||||
.prescaler = {
|
||||
.dev = NULL,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn,
|
||||
.channel_numof = 2
|
||||
},
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
#define TIMER_1_ISR isr_letimer0
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -33,13 +33,16 @@ extern "C" {
|
||||
* @name Xtimer configuration
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
|
||||
#define XTIMER_DEV (TIMER_DEV(1))
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#else
|
||||
#define XTIMER_DEV (TIMER_DEV(0))
|
||||
#define XTIMER_HZ (1000000UL)
|
||||
#define XTIMER_WIDTH (32)
|
||||
#endif
|
||||
#define XTIMER_CHAN (0)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -136,19 +136,6 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn
|
||||
}
|
||||
};
|
||||
#define TIMER_0_ISR isr_letimer0
|
||||
|
||||
#else
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.prescaler = {
|
||||
@ -159,12 +146,25 @@ static const timer_conf_t timer_config[] = {
|
||||
.dev = WTIMER1,
|
||||
.cmu = cmuClock_WTIMER1
|
||||
},
|
||||
.irq = WTIMER1_IRQn
|
||||
}
|
||||
.irq = WTIMER1_IRQn,
|
||||
.channel_numof = 3
|
||||
},
|
||||
{
|
||||
.prescaler = {
|
||||
.dev = NULL,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn,
|
||||
.channel_numof = 2
|
||||
},
|
||||
};
|
||||
#define TIMER_0_ISR isr_wtimer1
|
||||
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
#define TIMER_0_ISR isr_wtimer1
|
||||
#define TIMER_1_ISR isr_letimer0
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -35,13 +35,16 @@ extern "C" {
|
||||
* The timer runs at 250 KHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
|
||||
#define XTIMER_DEV (TIMER_DEV(1))
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#else
|
||||
#define XTIMER_DEV (TIMER_DEV(0))
|
||||
#define XTIMER_HZ (250000UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#endif
|
||||
#define XTIMER_CHAN (0)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -145,19 +145,6 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn
|
||||
}
|
||||
};
|
||||
#define TIMER_0_ISR isr_letimer0
|
||||
|
||||
#else
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.prescaler = {
|
||||
@ -168,12 +155,25 @@ static const timer_conf_t timer_config[] = {
|
||||
.dev = TIMER1,
|
||||
.cmu = cmuClock_TIMER1
|
||||
},
|
||||
.irq = TIMER1_IRQn
|
||||
}
|
||||
.irq = TIMER1_IRQn,
|
||||
.channel_numof = 3
|
||||
},
|
||||
{
|
||||
.prescaler = {
|
||||
.dev = NULL,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn,
|
||||
.channel_numof = 2
|
||||
},
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
#define TIMER_1_ISR isr_letimer0
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -35,13 +35,16 @@ extern "C" {
|
||||
* The timer runs at 250 KHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
|
||||
#define XTIMER_DEV (TIMER_DEV(1))
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#else
|
||||
#define XTIMER_DEV (TIMER_DEV(0))
|
||||
#define XTIMER_HZ (250000UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#endif
|
||||
#define XTIMER_CHAN (0)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -199,19 +199,6 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn
|
||||
}
|
||||
};
|
||||
#define TIMER_0_ISR isr_letimer0
|
||||
|
||||
#else
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.prescaler = {
|
||||
@ -222,12 +209,25 @@ static const timer_conf_t timer_config[] = {
|
||||
.dev = TIMER1,
|
||||
.cmu = cmuClock_TIMER1
|
||||
},
|
||||
.irq = TIMER1_IRQn
|
||||
}
|
||||
.irq = TIMER1_IRQn,
|
||||
.channel_numof = 3
|
||||
},
|
||||
{
|
||||
.prescaler = {
|
||||
.dev = NULL,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn,
|
||||
.channel_numof = 2
|
||||
},
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
#define TIMER_1_ISR isr_letimer0
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -35,13 +35,16 @@ extern "C" {
|
||||
* The timer runs at 250 KHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
|
||||
#define XTIMER_DEV (TIMER_DEV(1))
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#else
|
||||
#define XTIMER_DEV (TIMER_DEV(0))
|
||||
#define XTIMER_HZ (250000UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#endif
|
||||
#define XTIMER_CHAN (0)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -199,19 +199,6 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn
|
||||
}
|
||||
};
|
||||
#define TIMER_0_ISR isr_letimer0
|
||||
|
||||
#else
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.prescaler = {
|
||||
@ -222,12 +209,25 @@ static const timer_conf_t timer_config[] = {
|
||||
.dev = TIMER1,
|
||||
.cmu = cmuClock_TIMER1
|
||||
},
|
||||
.irq = TIMER1_IRQn
|
||||
}
|
||||
.irq = TIMER1_IRQn,
|
||||
.channel_numof = 3
|
||||
},
|
||||
{
|
||||
.prescaler = {
|
||||
.dev = NULL,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.timer = {
|
||||
.dev = LETIMER0,
|
||||
.cmu = cmuClock_LETIMER0
|
||||
},
|
||||
.irq = LETIMER0_IRQn,
|
||||
.channel_numof = 2
|
||||
},
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
#define TIMER_1_ISR isr_letimer0
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user