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.

Compiler/MSP430F6736A: MSP430F6736A

Part Number: MSP430F6736A

Tool/software: TI C/C++ Compiler

SIR,

I want to map my P2.6 AND P2.7 AS uart ,

related code is attatched below ,

PMAPKEYID = 0x2D52;

PMAPCTL |= PMAPRECFG;

P2MAP7 = PM_UCA0RXD;
 P2MAP6 = PM_UCA0TXD;

PMAPKEYID=0;

my port mapping code is not working 

i didn't get my interrupt of uart 

  • Post all code. I guess that selection bit is missing. My working UART / I2C mapping...

    		#if defined(I2C1) || defined(I2C2) || defined(UART1) || defined(UART2)
    		mov.w #02D52h, &PMAPPWD				; Enable Write-access to modify port mapping
    		mov.w #PMAPRECFG, &PMAPCTL			; Allow reconfiguration during runtime
    		#endif
    
    		#ifdef I2C1 
    		mov.b #PM_UCB0SCL, &P4MAP4
    		mov.b #PM_UCB0SDA, &P4MAP5
    		#endif
    		
    		#ifdef I2C2
    		mov.b #PM_UCB1SCL, &P4MAP6
    		mov.b #PM_UCB1SDA, &P4MAP7
    		#endif
    
    		#ifdef UART1
    		mov.b #PM_UCA0RXD, &P4MAP4
    		mov.b #PM_UCA0TXD, &P4MAP5
    		#endif
    
    		#ifdef UART2 
    		mov.b #PM_UCA1RXD, &P4MAP6
    		mov.b #PM_UCA1TXD, &P4MAP7
    		#endif
    
    		#if defined(I2C1) || defined(I2C2) || defined(UART1) || defined(UART2)
    		mov.w #0, &PMAPPWD				; Disable Write-Access to modify port mapping
    		#endif
    
    		#if defined(I2C1) || defined(I2C2) || defined(UART1) || defined(UART2) 
    		mov.b #0F0h, &P4SEL
    		#else
    		mov.b #000h, &P4SEL
    		#endif
    

  • Sir,
    this is my whole code for mapping which i am using ,

    PMAPKEYID = 0x2D52;

    PMAPCTL |= PMAPRECFG;

    P2MAP7 = PM_UCA0RXD;
    P2MAP6 = PM_UCA0TXD;

    PMAPKEYID=0;


    P2SEL |= (BIT6+BIT7);
    P2DIR &=~ BIT7;
    P2DIR |= BIT6;
  • Hello Satish,

    In general, it looks like your PMAP setup looks correct, although since this is UART, the PxDIR bits are a don't care. I would say this may be more on the UART setup side of things. I would recommend looking at the following app note for help in debugging the UART.

    http://www.ti.com/lit/slaa734

**Attention** This is a public forum