4.7 UART
The FPA adapter (FlafhPro430 - USB-MSP430-FPA only) can provide UART communication
via BSL-Tx and BSL-Rx pins (#12 and #14). The UART is simplified and has following limitations:
- can be used only when the BSL communication is not used,
- message via UART can be send and received when the JTAG communication is finished
eg. after ro before programming the target device,
- Baud rate 9.6 kb/s or 57.6 kb/s - start bit, 8 message bits, parity bit and stop bit,
- protocol type Half Duplex Master/Slave - Tx message or Tx message and Rx message,
- Tx message size - 1 to 50 bytes
- Rx message size - 0 to 50 bytes
F_Custon_Function
F_Custom_Function - Custom Function eg. UART transferring message from/to data
buffer to external device via BSL pins with baud rate 9.6 kb/s or 57.6
kb/s.
VALID FPA index - ( 1 to 64 ) or 0 (ALL FPAs) executed simultaneously.
Syntax:
MSPPRG_API INT_X F_Custom_Function( INT_X type );
type = 1 - UART- transferring message from/to data buffer to external device via BSL
pins with baud rate 9.6 kb/s.
type = 2 - UART- transferring message from/to data buffer to external device via BSL
pins with baud rate 57.6 kb/s
other type value reserved for the future.
Prepared definitions in header file
#define CUSTOM_FUNCTION_UART_9600 1
#define CUSTOM_FUNCTION_UART_38K4 2
#define UART_TX_SIZE_ADDR 0
#define UART_RX_SIZE_ADDR 1
#define UART_BUFFER_START_ADDR 0x10
#define UART_BUFFER_SIZE 50
Return value:
0 - FALSE
1 - TRUE
-1 (0xFFFFFFFF) - UART not supported
112