Issue: CC3100 pin conflict with P1.6 CBOUT and P2.2 TA2CLK on the MSP430F5529 Launch Pad
Goal: Map CBOUT to P4.1, and TBOCLK to P4.2 so that the Comparator can drive TimerB as a counter for use with the LMT01 temperature sensor in SYNC Comparator Mode.
Status: Code below compiles zero errors and runs but does NOT map the pins.
The F55229 Data Sheet page 57, chart 6-7 of the shows that Comparator_B output can either be mapped with PM_CBOUT0 value 0, or with PM_CBOUT1 value 17 and that the TimerB External clock in can be Port Mapped with PM_TB0CLK Value 1.
- Why is F5529 Port Mapping code below not working?
- To map Port4 Pins 1 to 7; does one map P4MAP01, or P4MAP0 ?
- Driver Library example maps P4MAP01? (Word) Is this the correct port to be mapping? Or should it be P4MAP0? (Byte)?
- See SLAU397 page 4 Table 1-3 Byte Access, and Table1-4 Word Access.
- Page 69 of the F55229 spec sheet Table 6-25 appears to imply that P4MAP0 to P4MAP7 should be used and that the Driver Library example is WRONG??
3. Why for Comparator_B is there PM_CBOUT0 and CBOUT1? There is only one Comparator_B in the F5529. (Mapping either 0 or 1 does not work.)
Option 1: Using “unsigned char” as the Driver Library doc example p 243 uses char
Compiles with ZERO errors, runs, does NOT map P4.1 and P4.2. WHY???
const unsigned char port_mapping[] = {
// Port P4
PM_NONE, // P4.0
PM_CBOUT1, // P4.1
PM_TB0CLK, // P4.2
PM_NONE, // P4.3
PM_NONE, // P4.4
PM_NONE, // P4.5
PM_NONE, // P4.6
PM_NONE // P4.7
};
PMAP_initPortsParam temperatureInitPortsParam =
{
(const unsigned char *)port_mapping,
(unsigned char*)&P4MAP01,
1,
PMAP_DISABLE_RECONFIGURATION
};
PMAP_initPorts(P4MAP_BASE, &temperatureInitPortsParam);
Option 2: Using “uint8_t” as the actual pmap.h code in the project uses this term
Compiles with ZERO errors, runs, does NOT map P4.1 and P4.2. WHY???
const uint8_t myP4Map[] = {
PM_NONE, // P4.0
PM_CBOUT1, // P4.1
PM_TB0CLK, // P4.2
PM_NONE, // P4.3
PM_NONE, // P4.4
PM_NONE, // P4.5
PM_NONE, // P4.6
PM_NONE // P4.7
};
};
PMAP_initPortsParam temperatureInitPortsParam =
{
(const uint8_t*)myP4Map,
(uint8_t*)&P4MAP01, //Both 0 and 01 compile OK, see Port Map Controller user Guide SLAU397 page 4 single digit for bytes, double digit for word
1,
PMAP_DISABLE_RECONFIGURATION
};
PMAP_initPorts(P4MAP_BASE, &temperatureInitPortsParam);
All help is greatly appreciated,
Engineer ...Lorne