Jump to content
43oh

Pin Mapping /Debug versus Aux Serial UART


Recommended Posts

I apologize if this is obvious, but on a new version of a MSP430FR5949 based datalogger programmed using Energia 18 - I switched the pins on the physical chip for serial communication from the Aux to the Debug UART for better layout.  Below is the modified pin map energia_pins.h file -

#if defined(__MSP430_HAS_EUSCI_A0__) || defined(__MSP430_HAS_EUSCI_A1__)
static const uint8_t DEBUG_UARTRXD = 18;  /* Receive  Data (RXD) at P2.1 */
static const uint8_t DEBUG_UARTTXD = 17;  /* Transmit Data (TXD) at P2.0 */
static const uint8_t AUX_UARTRXD = 22;     /* Receive  Data (RXD) at P4.5 */
static const uint8_t AUX_UARTTXD = 21;     /* Transmit Data (TXD) at P4.4 */
#define DEBUG_UARTRXD_SET_MODE (PORT_SELECTION1 | INPUT)
#define DEBUG_UARTTXD_SET_MODE (PORT_SELECTION1 | OUTPUT)
#define AUX_UARTRXD_SET_MODE (PORT_SELECTION1 | INPUT)
#define AUX_UARTTXD_SET_MODE (PORT_SELECTION1 | OUTPUT)
#define DEBUG_UART_MODULE_OFFSET 0x00
#define AUX_UART_MODULE_OFFSET 0x20
#define SERIAL1_AVAILABLE 1
#endif

I can't seem to even get a simple serial print out in terminal, although it loads without errors.  

How do I specify to use the debug_uartrxd and debug_uarttxd pins?  Is there something similar to Wire.setModule() for serial?

Link to post
Share on other sites

So it was obvious, you can select the alternate serial port by simply initializing Serial1.begin(XXXX).  However, initially this didn't work, because when I made the msp430fr5949 pin map above the correct pin assignments for DEBUG_UART and AUX_UART were switched.  They should be (I believe) -

static const uint8_t DEBUG_UARTRXD = 22;  /* Receive  Data (RXD) at P2.1 */
static const uint8_t DEBUG_UARTTXD = 21;  /* Transmit Data (TXD) at P2.0 */
static const uint8_t AUX_UARTRXD = 18;     /* Receive  Data (RXD) at P4.5 */
static const uint8_t AUX_UARTTXD = 17;     /* Transmit Data (TXD) at P4.4 */

 and everything works fine.  

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...