-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20160 from maribu/cpu/msp430/timer
cpu/msp430: improve periph_timer
- Loading branch information
Showing
24 changed files
with
372 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
INCLUDES += -I$(RIOTBOARD)/common/msb-430/include | ||
|
||
# set default port depending on operating system | ||
PORT_LINUX ?= /dev/ttyUSB0 | ||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) | ||
|
||
# setup flash tool | ||
PROGRAMMER ?= mspdebug | ||
MSPDEBUG_PROGRAMMER ?= olimex | ||
|
||
PROGRAMMERS_SUPPORTED += mspdebug | ||
include $(RIOTBOARD)/common/msp430/Makefile.include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
INCLUDES += -I$(RIOTBOARD)/common/msp430/include | ||
|
||
# set default port depending on operating system | ||
PORT_LINUX ?= /dev/ttyUSB0 | ||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) | ||
|
||
# setup flash tool | ||
PROGRAMMER ?= mspdebug | ||
MSPDEBUG_PROGRAMMER ?= olimex | ||
|
||
PROGRAMMERS_SUPPORTED += mspdebug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (C) 2023 Otto-von-Guericke-Universität Magdeburg | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @defgroup boards_common_msp430 Common Configuration Snippets for MSP430 boards | ||
* @ingroup boards_common | ||
* @brief Board configuration snippets for MSP430-based boards | ||
* | ||
* All boards using a CPU from the MSP430 family share certain parts of their | ||
* configuration. This module provides a collection of fine grained | ||
* configuration snippets that can be reused for different boards. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright (C) 2023 Otto-von-Guericke-Universität Magdeburg | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @ingroup boards_common_msp430 | ||
* @{ | ||
* | ||
* @file | ||
* @brief Common timer configuration for TIMER_A clocked by SMCLK and | ||
* TIMER_B clocked by ACLK | ||
* | ||
* @author Marian Buschsieweke <[email protected]> | ||
*/ | ||
|
||
#ifndef CFG_TIMER_A_SMCLK_B_ACLK_H | ||
#define CFG_TIMER_A_SMCLK_B_ACLK_H | ||
|
||
#include "periph_cpu.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @name Timer configuration | ||
* @{ | ||
*/ | ||
/** | ||
* @brief Timer configuration | ||
*/ | ||
static const timer_conf_t timer_conf[] = { | ||
{ | ||
.timer = &TIMER_A, | ||
.irq_flags = &TIMER_A_IRQFLAGS, | ||
.clock_source = TIMER_CLOCK_SOURCE_SUBMAIN_CLOCK, | ||
}, | ||
{ | ||
.timer = &TIMER_B, | ||
.irq_flags = &TIMER_B_IRQFLAGS, | ||
.clock_source = TIMER_CLOCK_SOURCE_AUXILIARY_CLOCK, | ||
} | ||
}; | ||
#define TIMER_NUMOF ARRAY_SIZE(timer_conf) /**< Number of timers available */ | ||
|
||
#define TIMER0_ISR_CC0 (TIMERA0_VECTOR) /**< IRQ vector for channel 0 of TIMER_DEV(0) */ | ||
#define TIMER0_ISR_CCX (TIMERA1_VECTOR) /**< IRQ vector for channels !=0 of TIMER_DEV(0) */ | ||
#define TIMER1_ISR_CC0 (TIMERB0_VECTOR) /**< IRQ vector for channel 0 of TIMER_DEV(0) */ | ||
#define TIMER1_ISR_CCX (TIMERB1_VECTOR) /**< IRQ vector for channels !=0 of TIMER_DEV(1) */ | ||
/** @} */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* CFG_TIMER_A_SMCLK_B_ACLK_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
# set default port depending on operating system | ||
PORT_LINUX ?= /dev/ttyUSB0 | ||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial-MXV*))) | ||
# setup serial terminal | ||
BAUD ?= 9600 | ||
|
||
# flash tool configuration | ||
PROGRAMMER ?= goodfet | ||
GOODFET_FLAGS ?= --telosb | ||
|
||
PROGRAMMERS_SUPPORTED += goodfet | ||
|
||
include $(RIOTBOARD)/common/msp430/Makefile.include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
# set default port depending on operating system | ||
PORT_LINUX ?= /dev/ttyUSB0 | ||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) | ||
|
||
# setup flash tool | ||
PROGRAMMER ?= goodfet | ||
GOODFET_FLAGS ?= --z1 | ||
|
||
PROGRAMMERS_SUPPORTED += goodfet | ||
|
||
include $(RIOTBOARD)/common/msp430/Makefile.include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.