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