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.

MSP430F5329: Using UCB0SDA UCB0SCL

Part Number: MSP430F5329

I am confused. 

the Datasheet MSP430F532x SLAS678D page 4 shows
Pin 36 P3.0/UCB0SIMO/UCB0SDA

Pin 37 P3.1/UCB0SOMI/UCB0SLA

So how do I configure P3.0 as a SDA and P3.1 as SLA

Here is what I tried. 

void UCB0_Init(void)
{
// make this I2C compatible.
// P3.0 = SDA Slave UCB0SDA
// P3.1 = SCL Slave UCb0SCL
P3SEL |= 3;

PMAPKEYID = 0x2d52;
// PMAPRECFG = 1; // uncomment if we want to reconfigure peripherals somewhere else
P3MAP0 = PM_UCB0SDA;
P3MAP1 = PM_UCB0SCL;

// Should clear PMAP after 32 clocks
}

The IAR compiler says P3MAP0, PM_UCB0SDA, P3MAP1 and PM_UCB0SCL are not defined. 

Table 3 shows it on page 10. 

Port Mapping Controller Table 9. says "The port mapping controller allows the flexible and reconfigurable mapping of digital functions to port P4."

What do you do for port 3?

How do I make this work? The documentation does not say anything about Port 3.  

The Port Mapping Controller Chapter 13 of the MSP430x5xx and MSP430x6xx Family User's Guide SLAU208P

Chapter 13 Port Mapping Controller Table 13-1 shows examples that includes PM_UCB0SCL and PM_UCB0SDA.
Table 13-3 lists PxMAP0 - PxMAP7 where I assume the x is the port number. 

I do not know how this works. 

Kip

  • Hello Kipton,

    Port Mapping is only supported on PORT4 of this part. Please see the port mapping table within the datasheet for specifics.

    When a pin is labeled as follows , P3.1/UCB0SOMI/UCB0SLA, this signifies which functions are brought out to that pin. To choose which one is active, you have to configure the pin registers appropriately. Usually the PxDIR and PxSELy registers. The exact combination you need can be found in the Input/Output Schematics near the end of the datasheet.

**Attention** This is a public forum