aegotheles 2 Posted May 11, 2017 Share Posted May 11, 2017 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? Quote Link to post Share on other sites
aegotheles 2 Posted May 15, 2017 Author Share Posted May 15, 2017 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.