Jump to content

Search the Community

Showing results for tags 'ccs'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 52 results

  1. Markers

    Energia.core

    Hi, I was working on an imported Energia project in CCS when I was informed that a software update to CCS was available. I installed the upgrade and restarted CCS in my project which now will not build. Instead I get the message "Buildfile generation error occurred.. Product 'energia.core' v18.0 is not currently installed and no compatible version is available. Please install this product or a compatible version. Build stopped.." My version of Energia is the latest (18). Can anyone help please! Thanks, Mark
  2. Hello, I am working on a project where I am trying to acquire ECG data for further analysis. Using AD8232 sensor I was able to get my raw data. So far I am using MSP430F5438A and my compiler is Code Composer Studio (CCS). I was asking if anyone did the next processing like filtering to remove noise and interference, at msp430. Can you please share your work (Analysis algorithm and Code)? Here in the attachment the graph of the raw data I am getting from my sensor (ADC values actually). Following is the link to AD8232 sensor datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/AD8232.pdf Thanks.
  3. Hello, I have obtained a PWM code online written in C. What is the equivalent code if it is written in Energia - .ino file using Energia IDE libraries? Here is the code: #include <msp430g2553.h> void setup() { WDTCTL = WDTPW + WDTHOLD; // Stop WDT if (CALBC1_1MHZ==0xFF) // If calibration constant erased { while(1); // do not load, trap CPU!! } DCOCTL = 0; // Select lowest DCOx and MODx settings BCSCTL1 = CALBC1_1MHZ; // Set range DCOCTL = CALDCO_1MHZ; // Set DCO step + modulation */ P1DIR |= BIT6; P1SEL |= BIT6; TACCR0 = 20000-1; // PWM Period 20us (substract 1 because it's 0-based) TACCTL1 = OUTMOD_3; TACCR1 = 10000; // CCR1 PWM duty cycle TACTL = TASSEL_2 + MC_1; // SMCLK, up mode _BIS_SR(CPUOFF); // Enter LPM0 } Any help is much appreciated.
  4. Hello, Can anyone help me with the source code for the pulse oximeter of the MAX30100 sensor (I2C communication)? Following is the datasheet: https://datasheets.maximintegrated.com/en/ds/MAX30100.pdf I'm using MSP430F5438A. Thanks.
  5. I am working with the MSP430F5529 Launchpad w/the Pervasive Display Gen2 EXT2 board and various eInk displays (BW, BWR). There seems to be a wide array of official(?) and unofficial SDKs, FW dev kits, boosterpacks, etc. available with varying degrees of compatibility with this particular LaunchPad. I am looking for some basic pointers on creating a simple GUI tool for sending images to the display. I can compile the latest 1.21 FW (via CCS using PDI Apps as target), flash the FW and run the (precompiled) PDI Apps Ver 1.21.exe GUI tool to send images to display, however it seems there is no source code for this GUI tool provided(?). Or, am I just not looking in the right place? Is there a project and/or document that explains/demonstrates creating a simple GUI or command line to interface with the hardware (for example making calls to the PDI_apps_drivers command handlers) to send an image to the display. So far I have found two projects which seem to have potential for good starting point(?): CCS IDE and EPD Extension Board Gen2 (EXT2)_v1.21 using the PDI Apps target _preferable_ (or the MSP430F5529 specific example target). Energia IDE (or Visual Micro MSVS plugin) and EPD_Demo.ino with the Pervasive_EPD_BoosterPack2 (I'd prefer to use C++, but not completely opposed to python if necessary as starting point.) Thanks for any pointers in the right direction.
  6. biza

    MSP432P401R I2C +TMP006

    Hi fellows, I have some facing some problems with interface on sensor TMP006, now I have done the I2C driver in CMSIS, the problem is in the TMP006 file, I can not configure the registers to make the conection with i2c protocol I2C.c I2C.h tmp006.c tmp006.h
  7. biza

    MSP432 RTC User adjust

    can anyone some help me? I have some problems with user rtc configuration in msp432 I made a firmware where the user choose by hardware configuration adjust date and time (alarm clock). The problem is ... after the user adjust date and time I would like use the rtc to control the watch and show the current date and time in a lcd. The problem is ... after the user adjust date and time I would like use the rtc to control the watch and show the current date and time in a lcd. Soo i need some help in two things pass the user value (decimal) to hexadecimal or BCD and the inverse get the hexadecimal or BCD value to decimal to show in LCD . I'am using CCS, in CMSIS on attach i leave the code I have made to test it!
  8. biza

    MSP432 RTC User adjust

    can anyone some help me? I have some problems with user rtc configuration in msp432 I made a firmware where the user choose by hardware configuration adjust date and time (alarm clock). The problem is ... after the user adjust date and time I would like use the rtc to control the watch and show the current date and time in a lcd. The problem is ... after the user adjust date and time I would like use the rtc to control the watch and show the current date and time in a lcd. Soo i need some help in two things pass the user value (decimal) to hexadecimal or BCD and the inverse get the hexadecimal or BCD value to decimal to show in LCD . I'am using CCS, in CMSIS on attach i leave the code I have made to test it! test.zip
  9. I'm using the FRC Gamepad Tool to load the TI-supplied firmware for a USD HID joystick with a KMA210 magnetic angle sensor. I have a voltage divider taking the KMA210's 5V max output to 3.3V, and when plugging in the MSP and checking the windows game controllers, an axis does respond when I turn a magnet near the sensor, but the reading is all over the place. Bouncing back and forth by 40% of the whole angle range. I've tried using an external 5V supply, tried changing the sampling on the ADC, the Vref, the clock multiplier, the wires, the input pin, just about everything. Does anyone have any advice?
  10. This project is an offshoot of an earlier investigation of wireless wearables using the MSP430G2553: http://forum.43oh.com/topic/10060-msp430-wearable-with-radio/. 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: https://github.com/fmilburn3/Infrared/blob/master/IR_sendByte.ino. 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: https://github.com/fmilburn3/Infrared/blob/master/IR_Receiver/main.c . 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
  11. admirlk

    CCS7 Requirements

    It appears that CCS requires certain Windows Updates to be installed, before it can be installed. I found one of the two missing ones, but Windows Updates have been broken for several years on my machine. In other words, the 26k file I found is at 0% after 10 minutes. The last time I tried a similar sized update, it was at 0% after 24 hours. I will leave this going for now, but am not expecting it to get past 0%. I noticed in another thread that the CCS6 license is now free and found the download for it. I am curious if an older version will have the same requirements, or not. I have had Eclipse installed within the last year or so, so if this has to do with Eclipse I am thinking it will work. If it has to do with the plugin, I might still be out of luck. Since this the "defacto" IDE, I would prefer to use it. Any help or advise is appreciated.
  12. Hello, I'm not used to playing with C/C++ or even with compiled languages so maybe it'll be a dumb question but after a lot of research, I don't know what to do. I have an issue at compilation in a CCS project for CC3200 and I've already posted a question in the compiler section of TI's forum. I got help : I know now that my error is that I'm trying to use methods defined in a header file without having the corresponding source file in the project. So I am getting an "undefined symbol" error on theses methods, as you can see on the following screenshot. As I started my project in Energia IDE, I did some code using Energia's methods. Going on doing the project, I needed to add Free-RTOS. I never used Free-RTOS before so I took a demo project of Free-RTOS implementation for CC3200 as a base to do it. I succeeded to compile the demo project on my board. Also, I imported my Energia sketch in my CCS workspace and I was also able to build it and run it correctly on the board (via CCS). But then I tried to combine both project, and now I'm stuck with an issue. I added code from my Energia Sketch in the Free-RTOS demo project. As I am using Energia methods and constants such as digitalWrite or pinMode, I was not surprised that the IDE and the compiler couldn't find them. I investigated a bit to find out where these methods where defined and I found them in Energia.h. That's why I firstly tried to import this header only. Now that I have understood that I need the source file :), but I can't find it ! My last try was to look at the imports/symbols and file search paths of my imported Energia sketch in CCS (like the following) : - Imported Energia sketch project - Free-RTOS demo project (my project) I also read things about "lpcc3200_core" folder which was added when I imported the Energia Sketch. Maybe this is the core files that I need ? I'm still stuck and now I wonder if it's even possible to correctly import Energia framework this way, or if I should either choose TI-RTOS or write again my Sketch directly in C/C++. Thanks for reading me !
  13. CCS 7.1.0, Energia 1.6.10E18, Windows 10 x64 Any scetch, even empty one generates the same set of errors concerning definite files: subdir_rules.mk, IPAddress.cpp, MACAddress.cpp, main.cpp, WInterrupts.c: fatal error: Arduino.h: No such file or directory, fatal error: avr/pgmspace.h: No such file or directory, fatal error: Energia.h: No such file or directory fatal error: itoa.h: No such file or directory gmake: *** [xxx.o] Error 1 recipe for target xxx.o failed ending compilation as: Cannot build project. Referenced project 'CC3200-LAUNCHXL_core' contains build-errors. Separatelly, Energia IDE itself and CCS works fine. Path to Energia set correctly. Any help wanted.
  14. I designed a board using a MSP430G2553IPW28R its the 28 pin tssop package. I read on this forum that you can use the launchpad to program the part I have some code written and can program a 20 pin device but when i connect the wires to my board from the launchpad is cant find the device or its not there. Error connecting to the target: Could not find device (or device not supported) I used CCS and just for the hell of it did the MSP-EXP430G2-LaunchPad User Experience Application example which programs just fine but i get the same error when plugged onto my board. Here is how i connected the part to the launchpad. Yes 20 pin IC removed from launchpad. I am at a loss. My board is powered from its own 3.3v supply and the grounds are common. The ground is always connected between the launchpad and the proto board. for testing i just remove/reconnect the 2 spy-by-wire pins and add/remove the 20 pin g2553 for testing the output. The 28 pin parts are new from mouser and i have 2 boards that i built that do the same thing. Any help would be nice
  15. Hello fellows, I need some help, with a situation, I want convert some analog signals to digital and send him by the UART communication, but I dont get how to solve this problem. my digital values is represented by "tempADC" variable, soo how can I get a buffer with values to the pc with UART communication. I try many things, but i dont understand how to put my output signal in the terminal in this format. temperature: 40º temperature: 41º temperature: 42º temperature: 43º can anyone help me?! my code: #include "uart_Tx.h" #include "stdio.h" void UART_TxConfig(void){ /*CLOCK SYSTEM SUPORT (CS)*/ CS->KEY = 0x695A;/*UNLOCK ALL 16 LSB CS REGISTERS*/ CS->CTL0 = 0;/*RESET PARAMETERS*/ CS->CTL0 = CS_CTL0_DCORSEL_5;/**/ /*CLOCK SYSTEM*/ /*SELA_2 ACLK = REFOCLK*/ /*SELS_3 SMCLK = DCOCLK*/ /*SELM_3 MCLK = DCOCLK*/ CS->CTL1 = CS_CTL1_SELA_2 | CS_CTL1_SELS_3 | CS_CTL1_SELM_3; /*LOCK ACESSES TO REGISTERS*/ CS->KEY = 0;/*UNLOCK ALL 16 LSB CS REGISTERS*/ /*UART PIN CONFIGURATION*/ P1-> SEL0 |= BIT2 | BIT3; /*SET 2 UART PIN's*/ /*ACTIVE INTERRUPTION's*/ __enable_interrupt(); /*ACTIVE eUSCIA0 INTERRUPT IN NVIC MODULE*/ NVIC->ISER[0] = 1 << ((EUSCIA0_IRQn) & 31); /*CONFIGURE UART*/ UCA0CTLW0 |= UCSWRST; UCA0CTLW0 |= UCSSEL__SMCLK;/*SELECT SMCLK CLOCK SOURCE*/ /*BAUD RATE CALCULATION * BAUD RATE DIVISOR (TRANSMITIONS RATE) * 12MHz/(16*9600) = 78.125 VELOCITY *FRACTIONAL PORTION = 0.125 *FRACTIONAL */ UCA0BR0 = 26; /*48000000/16/115200*/ UCA0BR1 = 0x00; UCA0MCTLW = 0x1000 | UCOS16 | 0x0020; /*CONTROL WORD REGISTER*/ UCA0CTLW0 &= ~UCSWRST; /*SOFTWARE RESET DISABLE*/ UCA0IE |=UCRXIE; while(1){ } } /*UART INTERRUPT SERVICE ROUTINE*/ void EUSCIA0_IRQHandler (void){ if (UCA0IFG & UCRXIFG){ while(!(UCA0IFG & UCTXIFG)); UCA0TXBUF = UCA0RXBUF; //UCA0TXBUF = adcTemp; //P1->OUT ^= BIT0; } }
  16. Hello all! So, this is happening on BOTH my Ubuntu 16.04 AND Windows 8.1 systems. This is for a TM4C1294NCPDT. To reduce potential variables, I've reverted to using the EK-TM4C1294XL Development Board. To reproduce: Fresh install of CCSv7.1, Fresh install of Energia 18. Open CCSv7, Create a new workspace, select 'Project > New Energia Sketch', Energia Version set to 18, select 'Built-in Examples > 01.Basics > Blink.ino', selected device: 'LaunchPad (Tiva C) w/ tm4c129 (120MHz), select 'Finish'. Right Click 'Blink" project in the Project Explorer, select "Build Project'. Project builds fine. Push F11 (or select 'Debug Blink' from the toolbar). Code is uploaded, but the debug 'Resume' button is grayed out. LED does not blink. Note: 'Blink' runs fine in the Energia IDE itself. What happened in the update to CCSv7? I'm taking a shot in the dark here, but I think the memory map is b0rked. If I disable "On a program load or restart" in the 'Debug > Auto Run and Launch Options' and then attempt to debug, CCS starts the debugger at "void ResetISR(void) {" in startup_gcc.c. See attached image for disassembly view. I think (IIRC) that the two ldr calls in assembly are usually right below that 'push', but my memory ain't what it used to be. Anyhow, if I try to 'Step Into' with F5, I immediately get a dreaded "No source available for "0xfffffffe" ... So, any idea what the hell happened? This shoots me dead until this is resolved... I figured TI would at least test Energia GCC debugging before releasing v7, though I do tend to err with my assumptions quite often. If you need anything, just holler. EDIT: For posterity, here's my TI E2E forum post on the same: https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/586137
  17. Hi, I needed a way to see how much of my C++ stack was being consumed in my MSP application - the traditional way is to "poison" the stack with a known pattern, and then to see how much of it gets burnt away. So I wrote the following - hope folk find it useful: The following code allows you to simply do this and to check at any point how much of the pre-allocated stack was consumed during peak usage, i.e. how close your app got to the bottom of the stack, or indeed, whether it over-ran. The TI CCS documentation is completely wrong in the names it gives for the global symbols that define the size and start of the stack - needs to be updated, Stick this code (or similar) wherever you want to report on/check stack usage <smallest number of byes left free on the stack since initialisation>/<configured size of the stack>. #if defined(STACK_CHECK) std::printf( "Stack: %d/%d\n", stackMinFreeCount(), stackMaxSize() ); #endif and then, in your main code you need to poison the stack as early as possible and then define the reporting routines: // Define STACK_CHECK to include stack usage diagnostics #define STACK_CHECK #if defined(STACK_CHECK) #define STACK_INIT 0xBEEF // Pattern to use to initially poison the stack extern uint16_t _stack; // Start of stack (low address) uint16_t stackMinFreeCount(void); uint16_t stackMaxSize(void); #endif #if defined(__cplusplus) extern "C" { #endif #if defined(__TI_COMPILER_VERSION__) || \ defined(__GNUC__) int _system_pre_init( void ) #elif defined(__IAR_SYSTEMS_ICC__) int __low_level_init( void ) #endif { //... stuff... #if defined(STACK_CHECK) // // Poison the stack, word by word, with a defined pattern // // Note that _system_pre_init is the earliest that we can // do this and that it may not be possible in TI-RTOS // // When we call the __get_SP_register intrinsic (same on IAR & CCS), it will return the address // of the RET address for the caller of this routine. Make sure that we don't trash it!! // register uint16_t *stack = &_stack; // Address of lowest address in .stack section register uint16_t *stack_top = reinterpret_cast<uint16_t *>(__get_SP_register()); do { *stack++ = STACK_INIT; // Poison stack addresses } while (stack < stack_top); // Stop before top of stack to leave RET address #endif return 1; } #if defined(__cplusplus) } #endif #if defined(STACK_CHECK) /** * Check how deep the stack usage has been * * \return \c uint16_t Minimum number of bytes to bottom of stack */ extern uint16_t __STACK_END; // End of data extern uint16_t __STACK_SIZE; // Linker-set size of stack uint16_t stackMinFreeCount(void) { const uint16_t *stack = &_stack; uint16_t freeCount = 0; while (*stack == STACK_INIT && stack++ <= &__STACK_END) { freeCount++; } return freeCount << 1; } /** * Return size of C++ stack * * Set by the linker --stack_size option * * \return \c uint16_t Configued maximum size of the stack in bytes */ uint16_t stackMaxSize(void) { return static_cast<uint16_t>( _symval(&__STACK_SIZE) ); } #endif int main(void) { ... stuff #if defined(STACK_CHECK) std::printf( "Stack: %d/%d\n", stackMinFreeCount(), stackMaxSize() ); #endif ...stuff }
  18. Unit

    MSP430F5529 JSON Code

    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: https://dev.ti.com/gc/designer/help/Tutorials/Serial/index.html. 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
  19. 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.
  20. 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); }
  21. NurseBob

    CCS Free

    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 www.ti.com/ccstudio 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: http://www.ti.com/lsds/ti/tools-software/ccs-faq.page For additional questions, please contact ccs_license_file_help@list.ti.com 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!
  22. Available from the main CCS download page. Final version due in December. http://processors.wiki.ti.com/index.php/Download_CCS Downloading now. It'll let you know how it goes...
  23. 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= "suddenlink.net-D0B3"; //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\",\"184.106.153.149\",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 = Serial.read(); // 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 = Wire.read(); // 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
  24. gizmoguy3000

    MSP430G2553 with NRF24L01 Wireless

    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, http://forum.43oh.com/topic/2050-nrf24l01-registerscommands-and-functionswork-in-progress/page-2 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!
  25. Rickta59

    CCS for $9.99

    [NOTE] Before you bother trying to find this deal, read this post: http://forum.43oh.com/topic/10050-ccs-70-will-be-available-without-license-requiremens/ and this TI web page: http://processors.wiki.ti.com/index.php/CCSv7_Changes "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: https://store.ti.com/MSP430G2-LaunchPad-Development-Kit-With-Code-Composer-Studio-Promotion-P50861.aspx -rick [Edit] * price is $9.99 + plus shipping [/Edit]
×