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.

CCS/msp430f6435: msp430f6435 clock configuration for URAT

Part Number: MSP430F6435

Tool/software: Code Composer Studio

Hi I am trying to use UART on msp430f6435 but I am not getting proper clock configuration.

I have used ti resource UART reference code but it is not working the way it is assumed to be.

Ti resource website

"dev.ti.com/.../

  • Part Number: msp430f6435

    Tool/software: Code Composer Studio

    MSP430f6435 uart configuration

    P2.4 ==>Tx

    P2.5==>Rx

    7 6 5 4 3 2 1 0  (Port 2 bits)

    0 0 1 1 0 0 0 0  ==>0x30

    P2SEL |= 0x30;                            // Assign P2.4 to UCA0TXD and...

    P2DIR |= 0x30;                            // P2.5 to UCA0RXD

    is it the correct way to assign port2 as uart  for Tx & Rx ???

  • void Port_Mapping(void)
    {
      // Disable Interrupts before altering Port Mapping registers
      __disable_interrupt();     
      // Enable Write-access to modify port mapping registers
      PMAPPWD = 0x02D52;                        
      
      #ifdef PORT_MAP_RECFG                    
      // Allow reconfiguration during runtime
      PMAPCTL = PMAPRECFG;                     
      #endif  
      
      P2MAP4 = PM_UCA0TXD;
      P2MAP5 = PM_UCA0RXD;
    
      // Disable Write-Access to modify port mapping registers
      PMAPPWD = 0;                              
      #ifdef PORT_MAP_EINT
      __enable_interrupt();                     // Re-enable all interrupts
      #endif  
    }

    This will set up the secondary functions port mapping.
    Call Port_Mapping() before your P2SEL line.

  • still not working :(
    Port_Mapping();
    P2SEL |= (BIT4|BIT5); // Assign P2.4 to UCA0TXD and...
    P2DIR = BIT4;

    USCI_A_UART_initParam uart ; //uart init_param struct

    USCI_A_UART_disable(USCI_A0_BASE); //disable uart

    //configure init_param struct

    uart.selectClockSource =UCSSEL__ACLK;
    uart.clockPrescalar = 0x0003;
    uart.firstModReg= 0x00;
    uart.secondModReg = 0x03;
    uart.parity = 0x00; //no parity
    uart.msborLsbFirst = 0x00; //lsbfirst
    uart.numberofStopBits = 0x00; //one stop bit
    uart.uartMode = UCMODE_0; //uart_mode
    uart.overSampling = 0x00; //low freq baudrate generation

    ret = USCI_A_UART_init(USCI_A0_BASE,&msp_uart);

    USCI_A_UART_enable(USCI_A0_BASE);

    USCI_A_UART_enableInterrupt(USCI_A0_BASE,(UCRXIE|UCTXIE));
  • When you write to the USCI TX Register, do you get any signal on the pin?
  • were you able to solve this issue?

**Attention** This is a public forum