Loading...
Searching...
No Matches
msp430_regs.h File Reference

Cortex CMSIS style definition of MSP430 registers. More...

Detailed Description

Cortex CMSIS style definition of MSP430 registers.

Todo:
This file is incomplete, not all registers are listed. Further There are probably some inconsistencies throughout the MSP430 family which need to be addressed.
Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file msp430_regs.h.

#include <stdint.h>
#include "msp430_regs_common.h"
+ Include dependency graph for msp430_regs.h:

Go to the source code of this file.

Data Structures

struct  msp430_port_p1_p2_t
 GPIO Port 1/2 (with interrupt functionality) More...
 
struct  msp430_usart_t
 USART (UART, SPI and I2C) Registers. More...
 
struct  msp430_usart_sfr_t
 USART Special Function Registers (SFR) More...
 

USART clock selection

The vendor header files expose clock configurations selection field as one bitmask per bit.

This is pretty hard to read in the code, so we provide alias with better names.

#define UXTCTL_SSEL_UCLKI   0
 Clock USART using UCLKI clock.
 
#define UXTCTL_SSEL_ACLK   SSEL0
 Clock USART using auxiliary clock.
 
#define UXTCTL_SSEL_SMCLK   SSEL1
 Clock USART using sub-system master clock.
 
#define UXTCTL_SSEL_MASK   (SSEL0 | SSEL1)
 Mask to retrieve SSEL field.
 

Typing of base register objects

msp430_usart_sfr_t USART_0_SFR
 USART 0 SFR register map.
 
msp430_usart_sfr_t USART_1_SFR
 USART 1 SFR register map.
 
msp430_usart_t USART_0
 USART 0 register map.
 
msp430_usart_t USART_1
 USART 1 register map.
 

Macro Definition Documentation

◆ UXTCTL_SSEL_ACLK

#define UXTCTL_SSEL_ACLK   SSEL0

Clock USART using auxiliary clock.

Definition at line 88 of file msp430_regs.h.

◆ UXTCTL_SSEL_MASK

#define UXTCTL_SSEL_MASK   (SSEL0 | SSEL1)

Mask to retrieve SSEL field.

Definition at line 90 of file msp430_regs.h.

◆ UXTCTL_SSEL_SMCLK

#define UXTCTL_SSEL_SMCLK   SSEL1

Clock USART using sub-system master clock.

Definition at line 89 of file msp430_regs.h.

◆ UXTCTL_SSEL_UCLKI

#define UXTCTL_SSEL_UCLKI   0

Clock USART using UCLKI clock.

Definition at line 87 of file msp430_regs.h.

Variable Documentation

◆ USART_0

msp430_usart_t USART_0
extern

USART 0 register map.

The address is provided by the linker script

◆ USART_1

msp430_usart_t USART_1
extern

USART 1 register map.

The address is provided by the linker script