SeuPay 17 Posted August 31, 2012 Share Posted August 31, 2012 Doing some experiments with an older LaunchPad (rev 1.4). With a MSP340G2553 (hardware UART): Commpiling a small Sketch with serial communication found that the code size generated by the compiler is smaller using TimerSerial than the code size used for hardware UART: Target Board: LaunchPad w/ msp430G2452 (16MHz) Erasing... Programming... Done, 1358 bytes written <---- Using TimerSerial Target Board: LaunchPad w/ msp430G2553 (16MHz) Erasing... Programming... Done, 1930 bytes written <---- Using hardware UART any idea? Quote Link to post Share on other sites
cde 334 Posted August 31, 2012 Share Posted August 31, 2012 Try putting the two sketchs on the same 2553 chip, do you get the same result? Quote Link to post Share on other sites
SeuPay 17 Posted August 31, 2012 Author Share Posted August 31, 2012 There is one Sketch only. Is compiled using diferent options (target Microcontroller). Both of them are working correctly (taking care of inverting TXD and RXD lines ). When the target is MSP430G2452, the compiler will use TimerSerial library because there is not a UART available. The compiler produce a more compact code when simulate the UART, a strange result in my opinion. :?: Quote Link to post Share on other sites
energia 485 Posted August 31, 2012 Share Posted August 31, 2012 This is due to USCIAB0TX_VECTOR and USCIAB0RX_VECTOR being shared between UART and I2C. Unfortunately the I2C ISR code is pulled into even if you only use UART. This results in an increase in size. This will be revisited for the next release to see if this can be done in a more elegant and code size optimal way. SeuPay and pine 2 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.