This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UART MSP430fg4618

Other Parts Discussed in Thread: MSP430FG4618, MAX3232

I have experimental kit of MSP430fg4618. I want to run UART in it to communicate with MATLAB. I tried running example code from MSPware . When i used serial communication softwares such as termite it says" waiting for port".

#include <msp430fg4618.h>

int main(void)
{
    P2DIR |= 0x06;
    P2OUT ^= 0x06;
  volatile unsigned int i;

  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
  FLL_CTL0 |= XCAP14PF;                     // Configure load caps

  do
  {
  IFG1 &= ~OFIFG;                           // Clear OSCFault flag
  for (i = 0x47FF; i > 0; i--);             // Time for flag to set
  }
  while ((IFG1 & OFIFG));                   // OSCFault flag still set?

  P4SEL |= 0x03;                            // P4.1,0 = USART1 TXD/RXD
  ME2 |= UTXE1 + URXE1;                     // Enable USART1 TXD/RXD
  U1CTL |= CHAR;                            // 8-bit character
  U1TCTL |= SSEL0;                          // UCLK = ACLK
  U1BR0 = 0x03;                             // 32k/9600 - 3.41
  U1BR1 = 0x00;                             //
  U1MCTL = 0x4A;                            // Modulation
  U1CTL &= ~SWRST;                          // Initialize USART state machine
  IE2 |= URXIE1;// Enable USART1 RX interrupt

  _BIS_SR(LPM3_bits + GIE);                 // Enter LPM3 w/ interrupt
}

#pragma vector=USART1RX_VECTOR
__interrupt void USART1_rx (void)
{
  while (!(IFG2 & UTXIFG1));                // USART1 TX buffer ready?
  TXBUF1 = RXBUF1;                          // RXBUF1 to TXBUF1
}

I am using msp-fet430uif. Can i use that to communicate with MATLAB through COM port. When I used tera term it says unable to connect to port(Because i think it is busy debugging through JTAG). but when i stop debugging it connects to MSP-FET430UIF - CDC (COM14).

What do i do?

  • Other than most of the EXP boards with internal FET, the standalone FET430UIF does not support an application UART. The COM-port you see is only used for communication between PC and the FET.

    To see the serial output of your target board, you'll need to attach a separate SER/USB converter or a RS232 level shifter like the MAX3232 (to connect to a real COM-port).

    CCS provides a 'console' which intercepts data sent to printf by 'fetching' it from the running code through JTAG. However, this feature is not available outside CCS, for matlab, you'll need a real serial connection.

**Attention** This is a public forum