Macros | Functions
PMAP

Port mapper responsible for re-mapping functionalities of GPIO pins. More...

Macros

#define PMAP_ENABLE_RECONFIGURATION   PMAP_CTL_PRECFG
 
#define PMAP_DISABLE_RECONFIGURATION   0x00
 
#define PMAP_P1MAP   ((uint32_t)P1MAP - PMAP_BASE)
 
#define PMAP_P2MAP   ((uint32_t)P2MAP - PMAP_BASE)
 
#define PMAP_P3MAP   ((uint32_t)P3MAP - PMAP_BASE)
 
#define PMAP_P4MAP   ((uint32_t)P4MAP - PMAP_BASE)
 
#define PMAP_P5MAP   ((uint32_t)P5MAP - PMAP_BASE)
 
#define PMAP_P6MAP   ((uint32_t)P6MAP - PMAP_BASE)
 
#define PMAP_P7MAP   ((uint32_t)P7MAP - PMAP_BASE)
 
#define PMAP_configurePortsMultipleInstance(a, b, c, d, e)   PMAP_configurePorts(b,c,d,e)
 

Functions

void PMAP_configurePorts (const uint8_t *portMapping, uint8_t pxMAPy, uint8_t numberOfPorts, uint8_t portMapReconfigure)
 

Detailed Description

Port mapper responsible for re-mapping functionalities of GPIO pins.


DriverLib PMAP (Port Mapper) Operation


The port mapping controller allows the flexible and reconfigurable mapping of digital functions to port pins.

The port mapping controller features are:


Programming Example


The DriverLib package contains a variety of different code examples that demonstrate the usage of the PMAP module. These code examples are accessible under the examples/ folder of the MSPWare release as well as through TI Resource Explorer if using Code Composer Studio. These code examples provide a comprehensive list of use cases as well as practical applications involving each module.

Below is a very brief code example showing how to use the PMAP module to redirect the output of a TimerA CCR register.

First is the array configuration to remap the port:

/* Port mapper configuration register */
const uint8_t port_mapping[] =
{
//Port P2:
PM_NONE, PM_NONE, PM_NONE, PM_NONE, PM_TA1CCR1A, PM_NONE, PM_NONE,
PM_NONE
};

Next is the call to the actual PMAP API that persists the configuration:

/* Remapping TACCR0 to P2.4 */
MAP_PMAP_configurePorts((const uint8_t *) port_mapping, PMAP_P2MAP, 1,

Macro Definition Documentation

#define PMAP_ENABLE_RECONFIGURATION   PMAP_CTL_PRECFG

Referenced by PMAP_configurePorts().

#define PMAP_DISABLE_RECONFIGURATION   0x00

Referenced by PMAP_configurePorts().

#define PMAP_P1MAP   ((uint32_t)P1MAP - PMAP_BASE)
#define PMAP_P2MAP   ((uint32_t)P2MAP - PMAP_BASE)
#define PMAP_P3MAP   ((uint32_t)P3MAP - PMAP_BASE)
#define PMAP_P4MAP   ((uint32_t)P4MAP - PMAP_BASE)
#define PMAP_P5MAP   ((uint32_t)P5MAP - PMAP_BASE)
#define PMAP_P6MAP   ((uint32_t)P6MAP - PMAP_BASE)
#define PMAP_P7MAP   ((uint32_t)P7MAP - PMAP_BASE)
#define PMAP_configurePortsMultipleInstance (   a,
  b,
  c,
  d,
 
)    PMAP_configurePorts(b,c,d,e)

Function Documentation

void PMAP_configurePorts ( const uint8_t *  portMapping,
uint8_t  pxMAPy,
uint8_t  numberOfPorts,
uint8_t  portMapReconfigure 
)

This function configures the MSP432 Port Mapper

Parameters
portMappingis the pointer to init Data
pxMAPyis the Port Mapper to initialize
numberOfPortsis the number of Ports to initialize
portMapReconfigureis used to enable/disable reconfiguration Valid values are PMAP_ENABLE_RECONFIGURATION PMAP_DISABLE_RECONFIGURATION [Default value] Modified registers are PMAPKEYID, PMAPCTL
Returns
None

References ASSERT, HWREG8, PMAP_DISABLE_RECONFIGURATION, and PMAP_ENABLE_RECONFIGURATION.


Copyright 2016, Texas Instruments Incorporated