#include <clock.h> #include <delay.h> #include <uart.h> #include <msp430.h> #include <driverlib.h> int main() { WDTCTL = WDTPW + WDTHOLD; // Enable interrupts, so TIMER ISR is called when needed __enable_interrupt(); clock_init(); // init UART uart_init(); // Values for uart char text[20] = {0}; uint8_t text_length = 0; while (1) { memset(text, 0, sizeof(text)); // Requires full prinntf support! // Project -> Properties -> Build ->> MSP430 Compiler -> Advanced Options -> Language Options // Set "Level of printf/scanf support required (--printf_support)" to "full" text_length = sprintf(text, "ms: %lu\n", millis()); uart_write(text, text_length); delay(3000); } }