Search the Community

Showing results for tags 'ccs'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


  • Community Calendar

Found 36 results

  1. Hello Forums I am trying to use GUI Composer v2 (on the cloud) to create a GUI for a battery managment system, similar to the one in the SLAA478 Application Report, using the MSP-EXP430F5529LP and bq76PL536EVM-3. I've decided to use USB/Serial comms, which requires me to modify the code to send the information using JSON. I am following the example of using USB/Serial IO: The code given is as follows: #include <aJSON.h> // most launchpads have a red LED #define LED RED_LED //see pins_energia.h for more LED definitions void printled_statewithjson(int state){ aJsonObject* root = aJson.createObject(); if (root == NULL) { return; } aJson.addItemToObject(root, "LED", aJson.createItem(state)); char* string = aJson.print(root); if (string != NULL) { Serial.println(string); free(string); } aJson.deleteItem(root); } // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(LED, OUTPUT); Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) printled_statewithjson(1); // print json object with LED status set to 1 to UART delay(1000); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW printled_statewithjson(0); // print json object with LED status set to 0 to UART delay(1000); // wait for a second } I am trying to fully understand this example code, before implementing it into my program. Using CCS Cloud, I stepped through the program in debug mode. From what I understand, the loop() function is essentially the main function, which blinks the LED; setup() does as expected and initializes the MCU LED pin, and opening a serial port at 9600 baud rate. I cannot, however, understand the printled_statewithjson() function. How exactly does it work to be able to send the information? Regards
  2. Good Morning, This may be the wrong place to ask this question. If so, please let me know where to ask it.. I've been a Windows programmer for 20 years. I've pretty much stuck to User Interface development the whole time. I have been using .net and C# for the past 10 years so I am VERY SPOILED when it comes to letting the language do the grunt work and I finesse the code. I now find myself working on a personal project which requires me to program the MSP430G2553 controller. I started out by using Energia (which if you don't know, is a fork off of Arduino) The advantage of it is you can do a lot with very little code and without needing to know all the guts of the MSP430G2553. The disadvantages are that sometimes it doesn't work right. Sometimes it doesn't give you the control you need, sometimes it's hard to figure out if Energia isn't working, or if your code isn't working... Anyway, I've spent hundreds of hours getting parts of my program to work. I have been trying to get away with not having to learn how to write firmware and have to deal directly with the processor. However, I'm starting to think that I need to bite the bullet and take the time to overcome my learning curve and dive in headfirst to firmware development and the paradigm shift that comes with it. The program I am using needs to have control over changing into and out of the various Low Power Modes on the MSP430. I need to listen for interrupts. I need to use I2C to communicate with various devices that are connected to the MSP430. I need to monitor Power Level/Consumption from time to time. So, basically, I have the following questions: 1. Can Energia robustly and without errors do the above things? 2. Am I wasting my time getting all of the above accomplished using Energia? 3. Should I be using Code Composer Studio? 4. Having NEVER developed ANY controller level code outside of Arduino and Energia, what kind of Learning Curve am I looking at to accomplish the above things? 5. Where is the best place to start learning this? 6. Where is the best place to look for answers to MSP430 development questions? Thank you all in advance for any assistance and advice you might have.
  3. Hi all, I have recently found a sketch in arduino forum for frequency counting, which I tried running in MSP432 with energia and MSP430 with energia sketch on Code composer studio. The sketch basically counts the frequency using interrupts and prints the frequency on serial monitor but serial monitor is empty while running the program,.The sketch is as shown below, // Frequency counter sketch, for measuring frequencies low enough to execute an interrupt for each cycle // Connect the frequency source to the INT0 pin (digital pin 2 on an Arduino Uno) volatile unsigned long firstPulseTime; volatile unsigned long lastPulseTime; volatile unsigned long numPulses; void isr() { unsigned long now = micros(); if (numPulses == 1) { firstPulseTime = now; } else { lastPulseTime = now; } ++numPulses; } void setup() { Serial.begin(115200); // this is here so that we can print the result pinMode(3, OUTPUT); // put a PWM signal on pin 3, then we can connect pin 3 to pin 2 to test the counter analogWrite(3, 128); } // Measure the frequency over the specified sample time in milliseconds, returning the frequency in Hz float readFrequency(unsigned int sampleTime) { numPulses = 0; // prime the system to start a new reading attachInterrupt(0, isr, RISING); // enable the interrupt delay(sampleTime); detachInterrupt(0); return (numPulses < 3) ? 0 : (1000000.0 * (float)(numPulses - 2))/(float)(lastPulseTime - firstPulseTime); } void loop() { float freq = readFrequency(1000); Serial.println(freq); delay(1000); }
  4. I just got the following email: CHANGES FOR CODE COMPOSER STUDIO (CCS) As a long-term Code Composer Studio IDE customer we value your dedication. Thank you for being a loyal customer. TI has great news regarding Code Composer Studio (CCS); effective today Texas Instruments will no longer charge for CCS licenses. Going forward this means: You can upgrade simply by going to to download the latest CCSv7, install it and use it. You no longer need to use the myRegistered Software portal to manage licenses. For questions see FAQ: For additional questions, please contact Texas Instruments, Inc. Given that not six months ago I paid $500.00 for this product, I can say it doesn't actually make me a fan... Seems the sales rep might have been able to offer that I might want to wait a bit. On the other hand, I am in support of making professonal tools available to the maker market at non-corporate prices. Now, if only someone could convince IAR to do the same!
  5. This project is an offshoot of an earlier investigation of wireless wearables using the MSP430G2553: The concept has been successfully tested and is described below. I plan regular updates as the project progresses. The objective is to develop a wearable powered by a coin cell that can be controlled remotely. It could be used, as an example, in the tiara below or on a costume worn by dancers in a performance and controlled from offstage. In the photo an earlier MSP430G2553 coin cell powered wearable is attached to the tiara and driving 3 WS2812 LEDs. The constraints are: cost - unit cost for the receiver of $10 or less technology - common off the shelf components, MSP430G2553 construction - standard double sided PCB spec, keep SMD parts large enough to be hand soldered power - CR2032 (rated 3V and 225 mAH) life - needs to run at least half an hour on fresh batteries reception - 10m with clear line of sight, update at least every 100 ms transmission - desirable but not required size - 40mm/1.6" diameter for receiver programming - Energia desirable schedule - 6 month completion The transmitter will probably be placed on a "Booster Pack" for a LaunchPad running Energia. Multiple LEDs will be driven to gain extra distance, and if required multiple transmitters could be set up from different angles to assure good reception. A display would be helpful as on the FR6989 shown below with an IR LED. The initial Energia transmission sketch to test the concept is located here: The sketch was developed in Energia V17 using a MSP430G2553 LaunchPad and a 940 nm infrared LED. It loops from 0 to 255 and sends a single byte with the count via infrared to the receiver when a button is pushed. The packets for sending bytes do not follow an existing protocol. It is specific to this application and developed with the goal of getting a byte transmitted at least every 100 ms. The receiver will be a custom MSP430G2553 board powered by a coin cell with a TSOP38238 IR receiver. There will LEDs on the PCB and it will also have the capability to drive LEDs off board. The preliminary receiver code was written in C using CCS and direct register access: . The framework for the code is based on a post by RobG here on 43oh. The receiver takes transmissions from the Energia sketch linked above and outputs the current byte on eight LEDs in binary form. When the last byte is received it clears the LEDs and outputs the number of bytes received in error out of the expected 255. This allows analysis of reception at different distances and conditions. Shown below is the preliminary testing setup. In the foreground is the G2553 receiver with a TSOP38238 and output LEDs on a breadboard. Middle ground is a G2553 with the infrared LED sending bytes. Background is output from the receiver being monitored on an oscilloscope. The output of the TSOP38238 is quite clean and no errors were seen with the transmitter and receiver this close together. Transmission is at approximately 1000 bytes per minute or 16+ bytes/sec which is within the desired range. I subsequently modified the test setup to run off batteries so I could do some preliminary distance testing. With clear line of sight reception I saw no errors up to 5 meters with one transmission LED aimed directly at the receiver. Errors crept in after that, especially if the transmission is off to one side, not pointed directly at the receiver, or at a greater distance. Near term activities: increase the number of transmission LEDs evaluate the impact of off-center transmission further test in an environment that doesn't have reflective surfaces add WS2812 driver capability and investigating the impact of TSOP38238 interrupts on the WS2812 driver evaluate 2032 battery life further
  6. Available from the main CCS download page. Final version due in December. Downloading now. It'll let you know how it goes...
  7. Hello! I am compiling the following code through CCS 6.1.3, it is an imported sketch first then I add some thing else for it. But it seems It stuck in the setup function because it goes to LPM4 when it tries to use any USCI related function( For example: Wire.begin(),write to ()). Can some one help me with it? Thanks. The attach file is the ino file from energia 17 and the following is the Code? The uc is MSP430F5529, and it is trying to use I2C to communicate with ADXL345, UART to communicate with ESP8266. The reset is ADC stuff. And we have a button to do some control. Each of these parts works fine by themselves alone. This is why I can not understand. #include <Wire.h> #include <msp430f5529.h> #define DEBUG true //Prints AT responses to serial terminal, set to False if you do not want to print void ADC_SETUP( void ) ; void TIMER_A2_SETUP( void ) ; void EXTERNAL_SETUP( void ) ; void READ_ACCELERATION( void ) ; void READ_ADC( void ) ; //Global Variables char flag = 0x00 ; //Declares 8-bit flag character and initializes to 0. int btn_cnt = 0 ; //int png_cnt = 0 ; int tmr_cnt = 0 ; int accel_data[3] = { 0 , 0 , 0 } ; double temp = 0 ; int snd = 0 ; int trash = 0 ; #define DEVICE (0x53) // Device address as specified in data sheet byte _buff[6]; char POWER_CTL = 0x2D; //Power Control Register char DATA_FORMAT = 0x31; char DATAX0 = 0x32; //X-Axis Data 0 char DATAX1 = 0x33; //X-Axis Data 1 char DATAY0 = 0x34; //Y-Axis Data 0 char DATAY1 = 0x35; //Y-Axis Data 1 char DATAZ0 = 0x36; //Z-Axis Data 0 char DATAZ1 = 0x37; //Z-Axis Data 1 String wifiSSID= ""; //Set this to your WiFi SSID String wifiKey = "G2PBW489C600863"; //Set this to your WiFi password //String apiKey = "L0LX8JG2D8YETKFB"; //API key from thing speak, used to post data String apiKey = "7N3L4F8YP90A6S82"; //API key from thing speak, used to post data void setup() { __bic_SR_register( CPUOFF ) ; WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer //Setup peripherals ADC_SETUP() ; EXTERNAL_SETUP() ; TIMER_A2_SETUP() ; //pinMode(P4_7, OUTPUT) ; P2SEL &= ~BIT5 ; P2DIR |= BIT5 ; Wire.begin(); //I2C __delay_cycles(100); Serial.begin(115200); //UART __delay_cycles(100); //Put the ADXL345 into +/- 4G range by writing the value 0x01 to the DATA_FORMAT register. P2SEL &= ~BIT4 ; P2DIR |= BIT4 ; P2OUT &= ~BIT4 ; __delay_cycles(100); P2OUT |= BIT4 ; __delay_cycles(100); //digitalWrite(P4_7, LOW); P2OUT &= ~BIT5 ; __delay_cycles(100); //digitalWrite(P4_7, HIGH); P2OUT |= BIT5 ; __delay_cycles(100); writeTo(DATA_FORMAT, 0x01); __delay_cycles(100); __bic_SR_register( CPUOFF ) ; __delay_cycles(100); //Put the ADXL345 into Measurement Mode by writing 0x08 to the POWER_CTL register. writeTo(POWER_CTL, 0x08); __delay_cycles(100); __bic_SR_register( CPUOFF ) ; sendData("AT+RST\r\n",200,DEBUG); // reset module __delay_cycles(100); sendData("AT+CWMODE=3\r\n",100,DEBUG); //configure to access AP String cnnct = ("AT+CWJAP=\"" + wifiSSID + "\",\"" + wifiKey +"\"\r\n"); //Set up string to connect to wifi String response = sendData(cnnct,20000,DEBUG); //Connect to wifi using credentials provided while (response.indexOf("FAIL") != -1) { //If connection failed, try again response = sendData(cnnct,20000,DEBUG); } __bis_SR_register( GIE ); // interrupts enabled } void loop() { __bic_SR_register( CPUOFF ) ; //Read acceleration data each loop READ_ACCELERATION () ; READ_ADC() ; //__bis_SR_register( GIE ); // interrupts enabled //ADC12CTL0 |= ADC12SC ; //Flag Handlers if( ( flag>>0 )&1 ) //Flag = 0bxxx1 {//Temp flag handler temp = .8059 * ( ( temp - 2637 ) / ( -13.6 ) ) ; // LSB -> deg C thingSpeak( temp , 0 , 0 ) ; //Reset flag flag &= ~BIT0 ; } if( ( flag>>1 )&1 ) //Flag = 0bxx1x {//Mic flag handler thingSpeak( snd , 0 , 0 ) ; //Reset flag flag &= ~BIT1 ; } if( ( flag>>2 )&1 ) //Flag = 0bx1xx {//External button flag handler //Send button pushed data thingSpeak( 0 , 0 , 0 ) ; //Reset flag flag &= ~BIT2 ; } if( ( flag>>3 )&1 ) //Flag = 0b1xxx {//External accelerometer flag handler thingSpeak( accel_data[0] , accel_data[1] , accel_data[2] ) ; //Reset flag flag &= ~BIT3 ; } if( ( flag>>4 )&1 ) //Flag = 0b1xxxx {//Ping flag handler thingSpeak( 0 , 0 , 0 ) ; //Reset flag flag &= ~BIT4 ; } } void thingSpeak( int datax , int datay , int dataz ) {// datax is used as main data send. If not used for accelerometer, datay and dataz are not used. char flg = flag ; //Set flg to ensure flag doesn't change. String dataWrite ; sendData( "AT+CIPSTART=\"TCP\",\"\",80\r\n" , 50 , DEBUG ) ; // turn on server on port 80 //Field 1: x data //Field 2: y data //Field 3: z data //Field 4: temp data //Field 5: microphone event //Field 6: ping data and reset button switch( flg ){ case 1: // Temp data dataWrite = "GET /update?api_key=" + apiKey + "&field4=" + String(datax) + "\r\n" ; break ; case 2: // Microphone event dataWrite = "GET /update?api_key=" + apiKey + "&field5=" + String(datax) + "\r\n" ; break ; case 4: // Button pushed data dataWrite = "GET /update?api_key=" + apiKey + "&field6=" + String(1) + "\r\n" ; break ; case 8: // Accelerometer data dataWrite = "GET /update?api_key=" + apiKey + "&field1=" + String(datax) + "&field2=" + String(datay) + "&field3=" + String(dataz) + "\r\n" ; break ; case 16: // Ping case dataWrite = "GET /update?api_key=" + apiKey + "&field6=" + String(0) + "\r\n" ; default: ; } String cmd = "AT+CIPSEND=" ; int length = dataWrite.length() ; cmd += length; cmd += "\r\n"; sendData(cmd,50,DEBUG); //Set up TCP connection sendData(dataWrite,10,DEBUG); //Send data to thing speak //long int time = millis(); //while((time+500)>millis()){} //delay for 5 seconds before sending data __delay_cycles(50) ; } String sendData(String command, const int timeout, boolean debug) { String output = ""; Serial.print(command); // send the read character to the Serial1 //long int time = millis(); long int time = 0 ; //while( (time+timeout) > millis())//wait for a response until timeout is up while( time++ < timeout ) { while(Serial.available()) {// The esp has data so display its output to the serial window char c =; // read the next character. output+=c; } if ((output.indexOf("FAIL") != -1)||(output.indexOf("OK")!=-1)){ //if response received break from the timeout loop break; } __delay_cycles(10) ; } return output; } void writeTo(byte address, byte val) { Wire.beginTransmission(DEVICE); // start transmission to device Wire.write(address); // send register address Wire.write(val); // send value to write Wire.endTransmission(); // end transmission } // Reads num bytes starting from address register on device in to _buff array void readFrom(byte address, int num, byte _buff[]) { Wire.beginTransmission(DEVICE); // start transmission to device Wire.write(address); // sends address to read from Wire.endTransmission(); // end transmission Wire.beginTransmission(DEVICE); // start transmission to device Wire.requestFrom(DEVICE, num); // request 6 bytes from device int i = 0; while(Wire.available()) // device may send less than requested (abnormal) { _buff =; // receive a byte i++; } Wire.endTransmission(); // end transmission } void setRegisterBit(byte regAdress, int bitPos, bool state) { byte _b; readFrom(regAdress, 1, &_ ; if (state) { _b |= (1 << bitPos); // forces nth bit of _b to be 1. all other bits left alone. } else { _b &= ~(1 << bitPos); // forces nth bit of _b to be 0. all other bits left alone. } writeTo(regAdress, _ ; } void ADC_SETUP( void ) {//Multiple conversions ADC12CTL0 = ADC12ON + ADC12MSC + ADC12SHT0_8 ; // Turn on ADC12, extend sampling time to avoid overflow of results ADC12CTL1 = ADC12SHP + ADC12CONSEQ_3 ; // Use sampling timer, repeated sequence ADC12MCTL0 = ADC12INCH_4 ; // ref+=AVcc, channel = A4 ADC12MCTL1 = ADC12INCH_12 + ADC12EOS ; // ref+=AVcc, channel = A12, end seq. //ADC12IE = ADC12IE0 + ADC12IE1 ; // Enable ADC12IFG.3 ADC12CTL0 |= ADC12ENC; // Enable conversions return ; } void TIMER_A2_SETUP( void ) {//Setup registers for Timer_A1 TA2CCR0 = 0x11C1 ; // Count up to 1 sec TA2CCTL0 = CCIE ; TA2CTL = TASSEL_1 + MC_1 + TACLR + ID_3 ; return ; } void EXTERNAL_SETUP( void ) {//Setup registers for external interrupt //P1DIR &= ~BIT1 ; P1OUT |= BIT1 ; // Set P1.1 to Pullup mode P1REN |= BIT1 ; // Enable P1.1 internal resistance P1IES |= BIT1 ; // P1.1 Hi/Lo edge P1IE |= BIT1 ; // P1.1 interrupt enabled P1IFG &= 0x00 ; // P1 IFG cleared return ; } void READ_ACCELERATION( void ) {// Read acceleration data from the accelerometer //Define local variables const int target = 140 ; uint8_t howManyBytesToRead = 6; readFrom( DATAX0, howManyBytesToRead, _buff); // each axis reading comes in 10 bit resolution, ie 2 bytes. Least Significat Byte first!! // thus we are converting both bytes in to one int accel_data[0] = (((int)_buff[1]) << 8) | _buff[0]; accel_data[1] = (((int)_buff[3]) << 8) | _buff[2]; accel_data[2] = (((int)_buff[5]) << 8) | _buff[4]; if( accel_data[0] >= target || accel_data[1] >= target || accel_data[2] >= target ) flag = 0x08 ; return ; } void READ_ADC( void ) { ADC12CTL0 |= ADC12SC; // Start conversion-software trigger while ( !( ADC12IFG ) ); //Reading ADC12 memory registers snd = ADC12MEM0 ; temp = ADC12MEM1 ; if( ( flag>>4 )&1 ) // flag = 0b1xxxx = 0x1x //Every 10 seconds {//If TEMP if( temp >= 0x2460 ) // ADC12MEM1 = A0 > 3.3V? { flag |= BIT0 ; //flag = 0bxxx1 } } if( snd >= 0x0A00 ) //Loud noise { flag |= BIT1 ; //flag = 0bxx1x } } /* //Define Interupts #pragma vector = ADC12_VECTOR __interrupt void ADC12_ISR_1( void ) {//ADC ISR snd = ADC12MEM0 ; //temp = ADC12MEM1 ; if( ( flag>>4 )&1 ) // flag = 0b1xxxx {//If TEMP if( temp >= 0x0000 ) // ADC12MEM = A0 > 3.3V? { flag |= BIT0 ; //flag = 0bxxx1 } } else {//ELSE MIC if( snd >= 0x0A00 ) //Loud noise { flag |= BIT1 ; //flag = 0bxx1x } } ADC12CTL0 |= ADC12SC ; //Clear CPUOFF bit __bic_SR_register_on_exit( CPUOFF ) ; }*/ #pragma vector = PORT1_VECTOR __interrupt void Port_1( void ) {//External Button ISR //Start timer for multifunction button TA2CTL |= MC_1 ; // Starting the timer counting up //Clear interrupt flag P1IFG &= ~BIT1 ; } #pragma vector = TIMER2_A0_VECTOR __interrupt void TIMER0_A2( void ) {//Timer A0 ISR, runs every 1 sec //Server Ping and ADC if( ( ( tmr_cnt%10 )^1 ) == 1 ) { // Ping server every 10 minutes flag = 0x10 ; //Send ping to server tmr_cnt = 0 ; } //Button function if( ( btn_cnt == 2 ) & ( ( flag>>5 )&1 ) ) { //Turn everything on } else if( btn_cnt == 5 ) // After 5 seconds, reset flag flag = 0x10 ; else if ( btn_cnt == 10 ) // After 10 seconds, turn off all interrupts { TA2CTL &= ~MC_1 ; // Turn off timer //DISABLE ALL OTHER MODULES flag = 0x20 ; P1IE |= BIT1 ; // P1.1 interrupt enabled } //Button "pattern" if( P1IN == 0xF0 ) //Masks btn_cnt++ ; else { btn_cnt = 0 ; } tmr_cnt++ ; //Clear interrupt flag TA2CTL &= ~TAIFG ; } Final.ino
  8. Hello all! I am currently working on a project that uses two NRF24L01 modules to communicate between two MSP430G2553 chips. The goal is to send a 14 character string of numbers and letters between the two devices. I have been trying to get code working with Code Composer Studio for a few weeks now, but have had no success at all. I found several posts on this forum from others who have tried similar things and this post in particular, with a link to a library created by Spirilis, however I've tried using this library and I can't get any of the code to compile. I suspect that recent changes to CCS and the compilers have rendered the code inoperable. It would be a huge help if someone could point me in the direction of a functional library or any resources that can help me communicate with these wireless modules and transmit/receive data. Thanks in advance!
  9. [NOTE] Before you bother trying to find this deal, read this post: and this TI web page: "Licensing With the release of Code Composer Studio v7 TI is no longer charging for licenses. You can simply download the tool and start using it. Along with this the end user license agreement has changed to a simple TSPA compatible license." [/NOTE] I didn't see anyone else mention this offer so here it is. Use the link below to buy the promo version of a G2 launchpad bundled with a node locked full version of CCS for only *$9.99: -rick [Edit] * price is $9.99 + plus shipping [/Edit]
  10. For those who may not have seen it, the black LaunchPads with Rev B pre-release MCU are being phased out. New red LaunchPads with a revision C production device are replacing it. The announcement in e2e is located here. There is information on timing and compatibility with CCS located here. A quote from the second link: TI recommends that you update all hardware and software be updated to latest Revision C devices. Support for MSP432P401R on CCS cloud ( and via MSP432Ware have been updated to match Revision C devices. Pre-production Revision C samples can be ordered online and an updated LaunchPad using XMS Revision C silicon is also available online. There is a note at the bottom of the compatibility table that Rev B will be removed from device support packages in 2017.
  11. Hey all! Finicky issue, and I've been up for way too many hours so I'm breaking from usual habit and posting after only doing minimal digging. Hopefully it's a simple solution. Fingers crossed. Board: TM4C1294NCPDT IDE: CCSv6.1 OS: Ubuntu 16.04 Compiler: GNU v4.9.3 (Linaro) So here's what's up: I'm versed using timers and setting up my vector table properly, or so I thought. Code Composer Studio isn't finding my interrupt handler... It's confuzzling me to say the least... Here's what I'm doing: In startup_gcc.c //......Skipping top of file for readability, all is stock // External declarations for the interrupt handlers used by the application. extern void Timer1AIntHandler(void); //......Skipping a bunch of nonsense for readabilities sake //Beginning of vector table (NOT Blizzard, but Snowflake/RA0) #else __attribute__ ((section(".isr_vector"))) void (* const g_pfnVectors[])(void) = { (void *)&_estack, // The initial stack pointer ResetISR, // The reset handler NmiSR, // The NMI handler FaultISR, // The hard fault handler IntDefaultHandler, // The MPU fault handler IntDefaultHandler, // The bus fault handler IntDefaultHandler, // The usage fault handler 0, // Reserved 0, // Reserved 0, // Reserved 0, // Reserved IntDefaultHandler, // SVCall handler IntDefaultHandler, // Debug monitor handler 0, // Reserved IntDefaultHandler, // The PendSV handler SysTickIntHandler, // The SysTick handler GPIOAIntHandler, // GPIO Port A GPIOBIntHandler, // GPIO Port B GPIOCIntHandler, // GPIO Port C GPIODIntHandler, // GPIO Port D GPIOEIntHandler, // GPIO Port E UARTStdioIntHandler, // For UARTStdio - UART0 Rx and Tx UARTIntHandler1, // UART1 Rx and Tx IntDefaultHandler, // SSI0 Rx and Tx IntDefaultHandler, // I2C0 Master and Slave IntDefaultHandler, // PWM Fault IntDefaultHandler, // PWM Generator 0 IntDefaultHandler, // PWM Generator 1 IntDefaultHandler, // PWM Generator 2 IntDefaultHandler, // Quadrature Encoder 0 ADC0IntHandler, // ADC Sequence 0 IntDefaultHandler, // ADC Sequence 1 IntDefaultHandler, // ADC Sequence 2 IntDefaultHandler, // ADC Sequence 3 IntDefaultHandler, // Watchdog timer IntDefaultHandler, // Timer 0 subtimer A IntDefaultHandler, // Timer 0 subtimer B Timer1AIntHandler, // Timer 1 subtimer A (Thar she blows...) And then in my main project file: // Only showing relevant pieces... // // Prototypes // ========== // Bunch of skipped out-of-scope stuff... void init_Timer(void); void Timer1AIntHandler(void); void init_Timer(void) { // Enable interrupts to the processor. ROM_IntMasterEnable(); // Enable Timer Peripheral ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1); // Configure Timer1 to be Periodic, with a 100Hz interrupt ROM_TimerConfigure(TIMER1_BASE, TIMER_CFG_PERIODIC); ROM_TimerLoadSet(TIMER1_BASE, TIMER_A, g_ui32SysClock / 100); // Setup the interrupts for Timer1 timeout. ROM_IntEnable(INT_TIMER1A); ROM_TimerIntEnable(TIMER1_BASE, TIMER_TIMA_TIMEOUT); // Enable Timer1A. ROM_TimerEnable(TIMER1_BASE, TIMER_A); } // void loop() is there somewhere, but it's HUGE, doesn't use the timer anyway. void Timer1AIntHandler(void) { // Clear the timer interrupt. ROM_TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT); // Call the FatFs tick timer. disk_timerproc(); } I need the timer for FatFS by ChaN. CCS gives me this on building (skipped everything until the linker output): Sooo what's going on here? Does the Energia part of CCS do something different with the timer section of the vector table? I have a custom ADC0IntHandler which works just fine... If anyone needs more info, I'm more than glad to provide it. Frustrations abound, and it especially sucks 'cuz after a 20 hour coding marathon, a problem like this is just... Awful.
  12. I am using the latest version: energia-0101E0017. I just reloaded it from Energia's website this morning. It is their December 2015 version. I am using the latest CCS version 6.1.3. I installed a fresh version of that a couple days ago and have applied all the updates I could find. Using the very popular I2C_Scan tool, I get bad results. I either get all addresses telling me there's a device there, or if I do a write(0); between begin and end transmission, I get no devices... See brief code snip below: void findAddress(int fromAddress, int toAddress) { for (int a = fromAddress; a < toAddress; a++) { Wire.beginTransmission(a); Wire.write(0); int endStatus = Wire.endTransmission(); if (endStatus == 0) { Serial.print("Found device at: 0x"); Serial.println(a, HEX); } } } When using Arduino with the same I2C_Scan tool, I can quickly discover my i2c device. So, can somebody let me know why this isn't working, and/or perhaps point me to a work-around? I've read many of the postings about this and have done the following: Removed jumper from LED for P1_6 Used resisters to give step-up or whatever you call it Tried it with and without the Write(0) between the begin and end transmission code above Anyway, just a bit frustrated today. I'm a spoiled Software Engineer, not used to the pain that is endured each day by firmware developers as they fight as hard against the development tools as they do against the code they write :-) Thanks, Curtis
  13. I noticed that if you use the TI arm compiler in CCS 6.x you can easily run code from ram. Unfortunately, it doesn't seem like they have implemented that for the arm-none-eabi-gcc compiler. Attached is a zip file project you can import into CCS. It is configured to run the msp432 at 48MHz using the high frequency crystal. It is also configured to generate small code using the nano.specs newlib configuration. In the default linker script, the data segment uses all the available ram starting at the base address of 0x20000000. The msp432 provides another bus address for SRAM at the base address of 0x01000000. This alias address is used to provide single cycle access to code in ram. I modified the the linker script in this project ( so that the first 512 bytes of ram are reserved for code. /* adjust based address for fixed size of 512 bytes (0x200) for code in ram */ /* NOTE: if you change this size, make sure you adjust .vtable offset also */ SRAM_DATA (RW) : ORIGIN = 0x20000000+0x200, LENGTH = 0x00010000-0x200 Additonally, a new section called .ramfunc is used to collect any code put into the ".ramfunc" section. You do this using the gcc specific _attribute__((section(".ramfunc"))) directive. When the chip resets, code has been added to copy the instruction code from flash to ram. extern uint32_t __ramfunc_load__; extern uint32_t __ramfunc_start__; extern uint32_t __ramfunc_end__; void resetISR(void) { /* Copy .ramfunc code and data segment initializers from flash to SRAM. */ volatile uint32_t *pui32Src, *pui32Dest; pui32Src = &__ramfunc_load__; for(pui32Dest = &__ramfunc_start__; pui32Dest < &__ramfunc_end__; ) { *pui32Dest++ = *pui32Src++; } ... Attachment In CCS, go to Project Menu and select the "Import CCS Projects ..." and select the archive file button. Use the file dialog to select the location where you downloaded the attached file. BTW: This is using the new CMSIS headers. Running in the debugger (note the address 0x10000FC of the code in the disassembly window)
  14. Well Hi! I'm reasonably new to the MSP430 stuff, been working with Arduino's and started some Embedded systems unit at University that has really sparked an interest in this stuff. I've been working mainly in Energia but trying my best to explore whats under some of the abstraction. Currently exploring CCS environment. Looking forward to sucking up some of this communities knowledge and hopefully providing some of my own as well
  15. Hello, I'm writing a program which includes fast pin switching (as fast as it can go!) on MSP432P401R. Initially, I had used Energia for this, but due to some unpredictable behaviour I switched to CCS 6.1.0. Now, apart from porting some Energia specific functions, like I/O functions and so on, I soon found out that even the bare minimum code for pin state flipping differs in speed, significantly. Below is an example code of Pin switching in CCS and Energia, respectively: #include "msp.h" void main(void) { WDTCTL = WDTPW | WDTHOLD; CSKEY = 0x695A; CSCTL0 = 0; CSCTL0 = DCORSEL_5; //set DCO to 48 MHz CSKEY = 0; P6DIR |= BIT4; //set pin 6.4 as output while(1){ P6OUT ^= BIT4; //flip state P6OUT ^= BIT4; } } Execution speed is around 1.05 MHz. Energia code: #include "msp432p401r.h" void setup() { //nothing goes here, makes execution even faster for some reason? } void loop() { while (1){ P6OUT ^= BIT4; P6OUT ^= BIT4; } } Execution speed: 2.16 MHz! My guess is that the speed increase is due to settings in somehow hidden Energia's main.cpp and related libraries, whereas CCS is "as it is" and needs more knowledge to set up properly. Where can I go from here? My current knowledge doesn't extend much past DCO settings. Thanks for the answers.
  16. Hi, I have built a code in CCS v6 for TM4C1294 for Modbus RTU Master/ Slave using basic C programming and Driver Libraries. I want to combine it with an Energia Sketch for Ethernet Client. Is this possible, please guide me with an example if possible. Thanks.
  17. I want to read a line of input from the Code Composer Studio (CCS) console using an MSP430 I am able to get printf(
  18. Hello All! This is my first post on this forum. So kindly excuse me if i do any faux pas! I am planning to shift to MSP430 after using arduino for long time. I have written a small code to read ADC value and when i press a button adc value gets stored in a variable. Now want I want is to make available this value even after microcontroller restarts. Can anyone tell me how to store variable in Non volatile FRAM? I am using MSP430FR5969 launchpad. I have looked into following examples but they are of not helping me. I am using Energia to program my launchpad.
  19. hi guys, i am new here. i am a linux user, so i have my inhibitions of going back to windows just so that this kit could work as i beleive it is very much possible in windows too. so the thing is.. i used CCSv5.2 to make a blinking LED Project and used the 'debug' option to get the code into the device. my device is msp430 Launchpad. the error message is as folows. //------------------------------------------ Error initializing emulator: No USB FET was found //------------------------------------------ to look into things i disconnected the Launchpad from the USB and reconnected it. the kernel message log gave the following message. //---------------------------------------------------------------------------------------------------------- [ 3077.760134] usb 3-4: new full-speed USB device number 3 using xhci_hcd [ 3077.796775] usb 3-4: New USB device found, idVendor=0451, idProduct=f432 [ 3077.796783] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 3077.796788] usb 3-4: Product: Texas Instruments MSP-FET430UIF [ 3077.796792] usb 3-4: Manufacturer: Texas Instruments [ 3077.796795] usb 3-4: SerialNumber: 2EFF426C50144B46 [ 3077.797050] usb 3-4: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes [ 3077.802856] cdc_acm 3-4:1.0: This device cannot do calls on its own. It is not a modem. [ 3077.802865] cdc_acm 3-4:1.0: No union descriptor, testing for castrated device [ 3077.802891] cdc_acm 3-4:1.0: ttyACM0: USB ACM device [ 3087.862748] hid-generic 0003:0451:F432.0003: usb_submit_urb(ctrl) failed: -1 [ 3087.862790] hid-generic 0003:0451:F432.0003: timeout initializing reports [ 3087.863722] hid-generic 0003:0451:F432.0003: hiddev0,hidraw0: USB HID v1.01 Device [Texas Instruments Texas Instruments MSP-FET430UIF] on usb-0000:00:14.0-4/input1 //------------------------------------------------------------------------------------------------------------- and when i run the lsusb command. //----------------------------------------------------------------------------------------------------------------- Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 003 Device 003: ID 0451:f432 Texas Instruments, Inc. eZ430 Development Tool Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 15d9:0a4f Trust International B.V. Bus 001 Device 003: ID 8087:07da Intel Corp. Bus 001 Device 004: ID 147e:1002 Upek Bus 002 Device 003: ID 05ca:1823 Ricoh Co., Ltd //-------------------------------------------------------------------------------------------------------------------- is the msp430 Launchpad an ez430 development tool? i didnt knw that.... also... if it shows it as a device.. why cant i connect to it.. anybody has any idea... if any more data is needed, i am happy to provide that too...
  20. Hi 43oh folks! I wrote a quick blog post & tutorial on the website. I wanted to walk through the process of setting up Code Composer Studio v6 to enable Energia sketch imports. This is a cool new feature that takes full advantage of the on-board hardware debugger that is available on our LaunchPad kits & allows developers to go beyond Serial.print(). This provides a nice migration path from Energia to CCS. Energia is great for rapid prototyping, but there are times when a true debugger could be helpful. With CCSv6, we can now import Energia sketches & get full debug features such as: - Hardware breakpoints - Watching variables - Stepping through code line-by-line - More! You can see my blog post & tutorial @ Thanks! Adrian
  21. Did anyone else already try the git (EGit?) integration of CCS v6? When I commit it via CCS menu option, CR/LF formatting of the source code is updated, which completely screws up diffs. CCS still saves files with CR/LF, the reformatting only happens at commit time. This does not happen when I edit files in CCS but commit via github's command line shell. Is this a bug/feature of CCS (or EGit). Did I miss a setting somewhere?
  22. Hi All, I am looking for advice on converting a CCS project into Energia, preferably making a library. I did not created the CCS project, it is actually a demo project downloadable from TI for a booster pack called TMP006. The link is The zip package included a CCS project with some C and header files. Where should I start? Any advise or links to understand Energia library will be much appreciated. Thanks in advance.
  23. i am working on a project that requires my MSP430F5659 to act as a USB host. i want to transfer some data from a pen drive that i connect to the flash memory of the MSP. can you help me with the realization? how can i use the pins of my MSP to connect to a pendrive so that it can act as a USB host? also, some help with the programming would be highly appreciated. i am using Code Composer Studio for programming purposes.
  24. For the sake of thanking this community for solving my issue ,I would like to write a post on how I overcame this issue thanks to community member Stepman . I use the TIva C Series Launchpad . For a program employing UART if you are getting errors like Description Resource Path Location Type unresolved symbol UARTprintf, first referenced in ./main.obj Description Resource Path Location Type unresolved symbol UARTStdioConfig, first referenced in ./main.obj Then you have not copied or linked your uartstdio.c file from utils/uartstdio.c If you are getting errors like Description Resource Path Location Type #20 identifier "GPIO_PA0_U0RX" is undefined main.c /SPI line 113 C/C++ Problem Description Resource Path Location Type #20 identifier "GPIO_PA1_U0TX" is undefined main.c /SPI line 114 C/C++ Problem Then you have to do the following steps :- 1.Right Click on your project and go to properties->arm compiler->advanced options->predefined symbols 2.Their , in the Pre-Define name area add a)PART_TM4C123GH6PM or whichever MCU part name you are using b)PART_IS_BLIZZARD_RB1 for the Tiva C series and PART_IS_BLIZZARD_RA1 for previous versions . The above should also be of help when you get errors related to other Pin definitions such as for SPI and PWM pin defs. Make sure that if you have included DEBUG in pre-define names then you include debug statements as follows in main.c //***************************************************************************** // // The error routine that is called if the driver library encounters an error. // //***************************************************************************** #ifdef DEBUG void __error__(char *pcFilename, uint32_t ui32Line) { UARTprintf("Error at line %d of %s\n", ui32Line, pcFilename); while(1) { } } #endif Prior to the above make sure that you have added driverlib.lib in properties->arm linker->include library Navigate to driverlib->CCS->Debug->driverlib.lib Make sure that you also add this file to your project . And if you are on a noob level don't forget to include TivaWare directory in your include options .