Contiki-NG
Loading...
Searching...
No Matches
msp430.c File Reference

MSP430FR5969 CPU initialization. More...

#include "contiki.h"
#include <msp430.h>

Go to the source code of this file.

Functions

static void msp430_init_dco (void)
 Initialize the Clock System (CS) module.
static void init_ports (void)
 Initialize all ports to output low to reduce power consumption.
void msp430_sync_dco (void)
 Synchronize DCO (no-op for FR5969, DCO is automatically calibrated).
int splhigh_ (void)
 Mask all interrupts that can be masked.

Detailed Description

MSP430FR5969 CPU initialization.

Configures the Clock System (CS) for 8MHz DCO operation.

Definition in file msp430.c.

Function Documentation

◆ init_ports()

void init_ports ( void )
static

Initialize all ports to output low to reduce power consumption.

PJ is intentionally left at its reset default (all inputs):

  • PJ.0..PJ.3 carry the JTAG signals used by the eZ-FET probe.
  • PJ.4/PJ.5 are the LFXT crystal pins; driving them as outputs would jam the 32.768 kHz oscillator that sources ACLK.

Definition at line 124 of file msp430.c.

◆ msp430_init_dco()

void msp430_init_dco ( void )
static

Initialize the Clock System (CS) module.

Configure:

  • DCO at 8 MHz
  • MCLK = SMCLK = DCO
  • ACLK = LFXT (32.768 kHz on-board crystal), with VLOCLK fallback if the crystal fails to stabilize.

Also configures FRAM wait states for 8MHz operation.

Definition at line 60 of file msp430.c.