Jump to content

Recommended Posts

Hey, I used CCS for my MSP430G2452 Launch Pad. But i completely removed it and i use now Energia. I installed driver too. My os is windows 10 and the jumpers are as the image i attach below. I see nothing when i write even a basic write function. My boundrate 9600. In the Tool menu of the Energia i choose my board but it doesnt give me chance to change the com port. Its com port is COM2. My pc has 2 usb 3.0 ports and 1 usb 2.0 port and use usb 2.0 for board. Please help.


Link to post
Share on other sites

You are right @@cooldoubtless, it is broken.


It looks like some recent ( or at least since the last time I looked .. which was years ) checkin into the source code has broken the TimerSerial code. The msp430g2231 and msp430g2452 use TimerSerial as Serial because they lack a uart. This requires that the pins used are the one from the timer_a. The TimerSerial code also needs to work with the 1.4 launchpad boards as they had no simple way to change the rx and tx assignments.


The change below is what I did to make it work for only the msp430g2452 and msp430g2231:

$ git diff
diff --git a/hardware/msp430/variants/launchpad/pins_energia.h b/hardware/msp430/vari
index 04b8574..13bf887 100644
--- a/hardware/msp430/variants/launchpad/pins_energia.h
+++ b/hardware/msp430/variants/launchpad/pins_energia.h
@@ -44,8 +44,13 @@ static const uint8_t TWISCL1  = 9;   /* P2.1 SW I2C */
 static const uint8_t TWISDA1  = 10;  /* P2.2 SW I2C */
 static const uint8_t TWISDA0  = 15;  /* P1.7 */
 static const uint8_t TWISCL0  = 14;  /* P1.6 */
+#if 0
 static const uint8_t DEBUG_UARTRXD = 3;  /* Receive  Data (RXD) at P1.1 */
 static const uint8_t DEBUG_UARTTXD = 4;  /* Transmit Data (TXD) at P1.2 */
+static const uint8_t DEBUG_UARTRXD = 4;  /* Receive  Data (RXD) at P1.2 */
+static const uint8_t DEBUG_UARTTXD = 3;  /* Transmit Data (TXD) at P1.1*/
 #if defined(__MSP430_HAS_USCI__)

You can see I switched the pin numbers. For the msp430g2452, the TX pin is 3 (P1.1) and the RX pin is 4 (P1.2). My change above will break support for all the USCI based UART versions.  


The Energia code really should be checking which type of UART is being used and flip the pin numbers.  You might want to file a bug on the Energia github issues page and complain. @@energia


Edit: .. never mind I filed one for you: https://github.com/energia/Energia/issues/874



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