BSP430
20141115
Board Support Package for MSP430 microcontrollers
|
BSP430 provides a standard console facility which gives you a 9600 baud 8N1 terminal along with cprintf() and related routines to output formatted text. It also supports input with cgetchar().
This application loops forever, printing a counter and blinking an LED every half second, and displaying any input characters that were received between outputs. The LEDs are a visual cue that the program is running even if something's wrong with the serial output.
Be aware that, unless BSP430_CONSOLE_RX_BUFFER_SIZE is set to a positive value, the receive infrastructure has only the one byte UART buffer available, and typing more than that between display updates will result in lost characters. This can be achieved by adding the following to the make command line when building the application:
AUX_CPPFLAGS=-DBSP430_CONSOLE_RX_BUFFER_SIZE=16
APP_VERBOSE
may be defined to 1 while building this application; with that flag, the number of characters transmitted and received, and the UART status register, are displayed on each iteration:
AUX_CPPFLAGS=-DAPP_VERBOSE=1