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.

MSP430F6638: Port_Mapping on MSP430F6638

Part Number: MSP430F6638

Hi

I can't get this working.

P2MAP2 = PM_UCA0RXD;
P2MAP3 = PM_UCA0TXD;

If it should work, what interrupt vector will UCA0RXBUF go to.

Maybe it's not possible, but I can't find information about what's possible?

I previous designs I have used the following with success:

P2MAP0 = PM_UCA0TXD;
P2MAP1 = PM_UCA0RXD;
P2SEL |= 0x03; // Assign P2.0 to UCA0TXD and...
P2DIR |= 0x03; // P2.1 to UCA0RXD

P2MAP3 = PM_UCA0TXD;
P2MAP4 = PM_UCA0RXD;
P2SEL |= 0x18;
P2DIR |= 0x18;

  • You forgot the P2SEL/P2DIR configuration.

    The interrupt is independent from the pin configuration; it goes to the same interrupt vector. (On the F6638, the USCI_A0 vector is at 0xFFF0.)
  • Sorry I did not add it in my question.
    I do have:
    P2SEL |= 0x0C; // Assign port mapping P2.2 to UCA0RXD and P2.3 to UCA0TXD 0000 1100
    P2DIR |= 0x0C; // P2.3 to UCA0TXD

    Do you have it working?
  • Her is my init Port_Mapping and Init_UART code:

    void Port_Mapping_RS232(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

    P2MAP2 = PM_UCA0RXD;
    P2MAP3 = PM_UCA0TXD;

    // Disable Write-Access to modify port mapping registers
    PMAPPWD = 0;
    #ifdef PORT_MAP_EINT
    __enable_interrupt(); // Re-enable all interrupts
    #endif
    }

    //-----------------------------------------------
    void Init_UART(void)

    { // 0001 1000
    P2SEL |= 0x0C; // Assign port mapping P2.2 to UCA0RXD and P2.3 to UCA0TXD 0000 1100
    P2DIR |= 0x0C; // P2.3 to UCA0TXD

    UCA0CTL1 |= UCSWRST; // **Put state machine in reset**

    // This 115200 code is working on TI EVM;
    // Max. Error Tx -0.6 to 0.8;
    // Max. Error Rx -1.8 to 1.1;
    UCA0CTL1 = UCSSEL_2; // DCO = SMCLK = 8MHz
    UCA0BR0 = 69; // 8MHz/115200 = 69,44. 69 = 0x45
    UCA0BR1 = 0; // Baudrate bliver: 8M / ( (4 * 69 + 4 * 70)/8) = 115107,9 (Der deles med 69,5)
    UCA0MCTL = UCBRS_4 + UCBRF_0; // Modulation UCBRSx=4, UCBRFx=0

    UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
    UCA0IE |= UCRXIE; // Enable USCI_A0 RX interrupt
    }
  • It's possible that you are affected by errata PORT15 or PMAP1. Ensure that there is no other pin for UCA0RXD.

  • Hi Clemens,

     Thanks for the hint, highly appreciated, but I don’t believe I’m affected but PORT15 or PMAP1.

     PORT15, I’m not single stepping.

     PMAP1 is only when clearing unselected inputs to mapped module.

     

    I would highly applicate if somebody from TI would either confirm:

    1)

    That it should work and they have a confirmed design where it’s working.

     

    2)

    That it does not work for some reason.

     Regards

**Attention** This is a public forum