Jump to content

MSP432 Add Hardware Serial Port with Energia

Recommended Posts

Hello , 

my problem is , energia msp432 pin mapping allows 2 serial ports. Serial and Serial1.

and msp432 have a 4 hardware serial ports. so i want to add one more serial port to the msp432 energia firmware.

i open a topic e2e.ti.com but they didn't answer yet.

so maybe somebody help me here.



in energia ide , msp432 hardware serial pins are p1_2,p1_3 and p3_2,p3_3.

but msp432p401r also have a two more hardware serial ports. p2_2,p2_3 and p9_6,p9_7.

if we look at the hardwareSerial.cpp file , last 2 lines 

HardwareSerial Serial(0);
HardwareSerial Serial1(1); 

and if we look hardware\msp432\variants\MSP_EXP432P401R\board_init.c file there is just 2 uart implemented with ti driverlib.

but if we write Board_init.c: Board_initUART function like

/* Set P1.2 & P1.3 in UART mode */

/* Set P3.2 & P3.3 in UART mode */

/* Set P2.2 & P2.3 in UART mode */

and i also add other uart definations to above the Board_initUART function.

but thats not working. so i discovery something.

if we just delete something in board_init.c file , purpose of syntax error. like i am deleting ";' charecter one line of code , energia still compile the sketch.

so energia doesn't compile board_init.c file. and i don't know how to compile it. there is makefile file but its not working for me. and i am bad compiling things.

so how i can edit energia msp432 hardware/firmware ? do you have a any idea ? 

thanks cevat

Cevat Bostancioglu 

Link to post
Share on other sites
  • 5 months later...

You are not alone on this.  Here is my post:

Posted 29 April 2015 - 08:34 AM

Does anyone know how to implement  additional hardware based UART pins for the msp432p401r?  I have looked in HardwareSerial.h  where the Serial object is instantiated. There are clues here and also in driverlib's  uart.h.  In uart.h (and uart.cpp) there is a notation for all methods that indicate that they may be called with a parameter (moduleInstance) selecting which hardware serial module to use ie. EUSCI_A0_MODULE, EUSCI_A1_MODULE, EUSCI_A2_MODULE or EUSCI_A3_MODULE. 

There is also a cryptic notatation in the HardwareSerial.cpp file for methods setModule & setPins which states: "/* Change which pins UART is on */    /* need to implement */."

Will this feature be implemented in the next version of Energia?

I know that I can use SoftwareSerial to implement additional UART connections but why waste perfectly good silicon.

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.

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...