Skip to content

Commit

Permalink
boards/olimex-msp430-h1611: uart_stdio @ 9600 Bd
Browse files Browse the repository at this point in the history
  • Loading branch information
maribu committed Dec 6, 2023
1 parent 5660ffd commit 8d0b59f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 11 additions & 3 deletions boards/olimex-msp430-h1611/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial-MXV*)))

# flash tool configuration
PROGRAMMER ?= mspdebug
MSPDEBUG_PROGRAMMER ?= olimex
PROGRAMMER ?= mspdebug
MSPDEBUG_PROGRAMMER ?= olimex

PROGRAMMERS_SUPPORTED += mspdebug
PROGRAMMERS_SUPPORTED += mspdebug
# UART @ 115200 Bd is not reliable with a CPU clock of ~ 5 MHz, occasionally
# chars get lost. Adding an 8 MHz crystal or an external resistor so that the
# DCO can reach 8 MHz does yield the speed bump needed for a more reliable
# UART connection @ 115200 Bd

BAUD ?= 9600

# When freshly plugged in the Olimex MSP430-JTAG-Tiny debugger provides a
# ttyACM interface, which is only available until the first flashing. A
Expand All @@ -24,3 +30,5 @@ TTY_SELECT_CMD := $(RIOTTOOLS)/usb-serial/ttys.py \
$(RIOTTOOLS)/usb-serial/ttys.py \
--most-recent \
--format path serial

CFLAGS += -DSTDIO_UART_BAUDRATE=$(BAUD)
4 changes: 4 additions & 0 deletions boards/olimex-msp430-h1611/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ extern "C" {
* @brief Clock configuration
*/
static const msp430_clock_params_t clock_params = {
/* Without an external resistor, the DCO frequency typically tops out
* at something like 5 MHz. However, the DCO calibration just picks the
* closet possible value, in this case it will go for the highest frequency
* the silicon at hand can run at. */
.target_dco_frequency = MHZ(8),
.lfxt1_frequency = 32768,
.main_clock_source = MAIN_CLOCK_SOURCE_DCOCLK,
Expand Down

0 comments on commit 8d0b59f

Please sign in to comment.