Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    NurseBob got a reaction from AwaisFarooqi in Error compiling for board MSP-EXP430F5529LP   
    >energia also has in its software serial library error
    Well, no. The 5529 has hardware serial.  Don't use software serial.  FWIW, it's not an error in Energia, but a limitation of the software serial library that it can't run with the faster clock.
  2. Thanks
    NurseBob got a reaction from MoreBeer in Resolved: Unable to upload anything to the EXP430   
    The first line in the error log says it all:
    java.io.IOException: Cannot run program "{runtime.tools.dslite-}/DebugServer/bin/DSLite": CreateProcess error=2, The system cannot find the file specified It's not about the launchpad but your Energia/system configuration.  In short, a "file not found" error for the compiler. So, an environment/path setting?
    On my system the compiler is found @ C:\ti\Energia\energia-1.8.10E23\hardware\tools\DSLite\DebugServer\bin
    if you search for dslite under your Energia installation is it found?
  3. Like
    NurseBob got a reaction from enl in Program MSP430G2553 with a smaller memory version in compiler   
    Interesting.  My experience with both IAR and CCS is that they refuse to load images to a device when it's different than what the project specifies and they both clearly report it as an error.
  4. Like
    NurseBob got a reaction from Rei Vilo in BOOSTXL-SHARP128 with MSP-EXP430FR5969   
    I'm going to assume you want to actually learn, and not just be handed "the answer."  Take a look at this on stackoverflow, it should help you figure out a solution your problem.
  5. Like
    NurseBob got a reaction from Rei Vilo in Using Adafruit's Fingerprint scanner with Msp430G2553   
    " Multiple libraries were found for..."
    You've got a configuration error message.  Time to read the docs on porting from other libraries.
    How-To: Porting Libraries Posting a Library for Energia Some Misconceptions about Libraries The above may provide guidance.  I am not able to help much beyond this suggestion as I'm deeply involved in other non-coding projects at this time.
  6. Like
    NurseBob got a reaction from energia in MSP430G2 no communication   
    You've described the problem, but supplied no information to allow remote diagnosis.  Without a schematic and related code, there's really no way to help, aside from the most general suggestions regarding jumpers, pins and I2C pullup resistors, all of which you've likely read (and hopefully applied).  Finally, you mention migrating an existing project; did you have that working, and if so, under what version of Energia? 
    Re: UART - there may be no hardware UART on your chip.
    "If your Launchpad is version 1.4 or earlier, the chips that it shipped with have no hardware UART and thus, no hardware configuration is necessary, but you must use the SoftwareSerial library included in Energia to communicate over the serial port."
    You indicate you have an MSP430G2452, according to SLAU318G, there is only USI availble on that chip, the UART is on the G2553's USCI impementation.
  7. Thanks
    NurseBob got a reaction from Anshikajain in I2C- MSP-EXP430G2ET   
    @Anshikajain Sorry, I've been offline for a couple of days. Not really sure what your question was, but FWIW, I rarely use Energia.  That said, when I2C fails in Energia, it's almost always a configuration problem.  My suggestion with the video was focused on how they configured the '430 jumpers.  The G25 devices were significantly different from the later versions, and many have tripped over jumpers incorrectly configured.  In your photo it appears you have the jumper P1.6 placed for the LED, and that was the very first comment in the video - the device will not work in I2C mode if that jumper is placed (at least on the older boards).  Looking at the docs, pins P2.1 and P2.2 are designated as SCL and SDA (sw), which I presume means software, not hardware I2C?  It's difficult to see in your photo, but it looks like you're using P1.6 and P1.7.  So, the video's comments, and this from Energia docs:
    When using I2C
    When using the Hardware I2C (Wire library) with SCL on P1.6 and SDA on P1.7 on the MSP-EXP430G2 you should remove the P1.6 jumper (GREEN LED) so that the LED doesn’t interfere with the I2C SCL signal...
    Energia reference
    I don't know if I'm able to help much further.  Please check your jumpers!
  8. Thanks
    NurseBob got a reaction from unknowsman in i2C Slave not working on MSP430FR5969   
    What i2c device are you connecting? What does is do? What's the device address? (per device specs) Is it really 2?
    Are you using pullups? I2c requires some type of pullup, and in general, the internal resistors on the '430 devices are not an appropriate value, so external are usually used.
    Note: by default, i2c comms are on LP pins 9 (SCL) and 10 (SDA)  not 15 &&16 - P1.6 and P1.7, Energia defaults to spi on those pins.
  9. Like
    NurseBob got a reaction from energia in i2C Slave not working on MSP430FR5969   
    What i2c device are you connecting? What does is do? What's the device address? (per device specs) Is it really 2?
    Are you using pullups? I2c requires some type of pullup, and in general, the internal resistors on the '430 devices are not an appropriate value, so external are usually used.
    Note: by default, i2c comms are on LP pins 9 (SCL) and 10 (SDA)  not 15 &&16 - P1.6 and P1.7, Energia defaults to spi on those pins.
  10. Like
    NurseBob reacted to Rickta59 in SD card bootloader - convert assembler to C++?   
    So I spent some time with the latest energia 1.8.7E21. It is still using msp430-gcc. That project I linked in the previous post won't work because that code is using the newer msp430-elf-gcc.   I did put together an example of using msp430-gcc style code and the blink project above that compiles and create asm only project .. well almost main has to jump to our asm code so there are a couple of instructions to get there.  Three files are needed:
    /* blink_with_msp430-gcc_asm.ino */ /* * we aren't going to use the .ino file */ main.cpp
    // We override the main function from Energia // and just jump to our __reset_vector__ routine // in blink.S int main() { asm("jmp _reset_vector__"); } blink.S
    ;------------------------------------------------------------------------------- ; blinkasm.S - gcc compatible interrupt driven led blinker in msp430 asm ; ; Version 1.0 - 10/22/2011 rick@kimballsoftware.com ; Version 1.01 - 7/22/2014 rick@kimballsoftware.com modified for msp430-elf-gcc ; Version 1.02 - 11/02/2014 rick@kimballsoftware.com more changes for msp430-elf-gcc ; $ msp430-elf-gcc blinkasm.S -D_GNU_ASSEMBLER_ -Wall -Os -g \ ; -fdata-sections -ffunction-sections -mmcu=msp430g2553 -T \ ; -T msp430g2553.ld -I/tmp/a/include -L /tmp/a/include/ -nostdlib ; Version 1.03 - 03/16/2019 rick@kimballsoftware.com made compatible with energia ; ;------------------------------------------------------------------------------- .file "blinkasm.S" #include <msp430.h> ;------------------------------------------------------------------------------- ;;; ---- gcc doesn't know about PC,SP,SR,CG1,CG2 ---- #define PC r0 #define SP r1 #define SR r2 ;------------------------------------------------------------------------------- ;;; ---- CONSTANTS ---- //#define TEST_IRQ_OVERHEAD #ifndef TEST_IRQ_OVERHEAD #define _50USEC (50-1) /* @1MHz MCLK results in 50uSec/interrupt */ #define _500MSEC 10000 /* @1MHz MCLK results in 500ms/LED toggle */ #else ;; This test illustrates the minimum CCR0 value that can be used ;; 22 cycles is based on the interrupt overhead #define _50USEC 22 /* @1MHz MCLK results in 23uSec/interrupt */ #define _500MSEC 1 /* @1MHz MCLK results in 23uSec/LED toggle */ #endif #define _LED_PIN BIT6 /* PORT1 pin, Launchpad has BIT0=Red and BIT6=Green */ ;------------------------------------------------------------------------------- ;;; ---- Registers used as globals ---- #define LED_PIN r4 #define TIMER_CYCLES r5 #define INTERVAL_CNT r6 #define CNT r7 ;; or you could use some ram variables .lcomm tcycles,2 ; example use of local bss data variable .lcomm cnt,2 ; example use of local bss data variable ;------------------------------------------------------------------------------- .section .text,"ax",@progbits ;------------------------------------------------------------------------------- .global _reset_vector__ ; it is important to name it "_reset_vector__" ; we prevent the C runtime start code from getting ; linked by using this name _reset_vector__: ;; disable watchdog and set stack to highest RAM addr mov.w #WDTPW|WDTHOLD,&WDTCTL mov.w #__stack,SP ; gcc ldscripts compute __stack based on mmcu ;; initialize clock,gpio,timer init: ;; configure DCO to precalibrated 1MHz clr.b &DCOCTL mov.b &CALBC1_1MHZ,&BCSCTL1 mov.b &CALDCO_1MHZ,&DCOCTL ;; initialize global register values mov.w #_LED_PIN,LED_PIN ; load constant into register constant mov.w #_50USEC,TIMER_CYCLES ; load constant into register constant mov.w #_500MSEC,INTERVAL_CNT ; load constant into register constant mov.w INTERVAL_CNT,CNT ; initialize register based counter ;; initialize GPIO bic.b LED_PIN,&P1OUT ; LED turned off to start bis.b LED_PIN,&P1DIR ; Configure P1.0 as output pin ;; initialize TimerA0 mov.w #CCIE,&TA0CCTL0 ; Enable TA0CCR0 interrupt mov.w TIMER_CYCLES,&TA0CCR0 ; Set TIMER_CYCLES cycles mov.w #TASSEL_2|MC_2,&TACTL ; SMCLK, Continuous Up Mode ;; enable interrupts and loop forever ;; real work done in the CCR0 interrupt nop eint loop: ;; Note: could sleep here instead jmp loop ; cycles:2 ;------------------------------------------------------------------------------- ; TIMER0_A3_ISR - Timer0_A3 CCR0 interrupt handler for vector 0xfff2 ;------------------------------------------------------------------------------- .global __isr_9 ; to insert an interrupt vector into the vector ; table from assembly, we have to use a specific ; naming convention we must call this function ; "__isr_9" this forces it into the 9th vector ; slot counting from 0 starting memory address ; 0xffe0. It is 9 because each vector is ; 2 bytes so we end up in slot 0xfff2 ; all this is because of the way msp430-gcc ; works with interrupts ; .vectors in the msp430g2553/memory.x starts ; @ 0xffe0 ; there are numbered isr_0 ... isr_14 even though ; there are 16 vectors. isr_15 is actually called ; _reset_vector__ you can see how we use it in this ; code. ; see the file: ; http://www.ti.com/lit/ds/symlink/msp430g2553.pdf ; look at the "Interrupt Vector Table" page 11 __isr_9: ;; before we even start running the mcu does a push PC, and a push SR cycles:6 dec.w CNT ; have we looped INTERVAL_CNT times? cycles:1 jnz 1f ; exit if we haven't reached 0 cycles:2 ;; toggle led pin after (INTERVAL * TIMER_CYCLES) has occured xor.b LED_PIN,&P1OUT ; cycles:4 mov.w INTERVAL_CNT,CNT ; reinitialize interval counter cycles:1 1: add.w TIMER_CYCLES,&TA0CCR0 ; set new CCR0 and go again cycles:4 reti ; cycles:5 ; vim: ts=8 sw=8 expandtab: Put those in a new Energia sketch compile it for an msp430g2553 and it should produce output that looks like this:
    blink_with_msp430-gcc_asm.ino.elf: file format elf32-msp430 Disassembly of section .text: 0000c000 <main>: c000: 03 3c jmp $+8 ;abs 0xc008 c002: 0f 43 clr r15 0000c004 <__ctors_end>: c004: 30 40 5e c0 br #0xc05e 0000c008 <_reset_vector__>: c008: b2 40 80 5a mov #23168, &0x0120 ;#0x5a80 c00c: 20 01 c00e: 31 40 00 04 mov #1024, r1 ;#0x0400 0000c012 <init>: c012: c2 43 56 00 mov.b #0, &0x0056 ;r3 As==00 c016: d2 42 ff 10 mov.b &0x10ff,&0x0057 c01a: 57 00 c01c: d2 42 fe 10 mov.b &0x10fe,&0x0056 c020: 56 00 c022: 34 40 40 00 mov #64, r4 ;#0x0040 c026: 35 40 31 00 mov #49, r5 ;#0x0031 c02a: 36 40 10 27 mov #10000, r6 ;#0x2710 c02e: 07 46 mov r6, r7 c030: c2 c4 21 00 bic.b r4, &0x0021 c034: c2 d4 22 00 bis.b r4, &0x0022 c038: b2 40 10 00 mov #16, &0x0162 ;#0x0010 c03c: 62 01 c03e: 82 45 72 01 mov r5, &0x0172 c042: b2 40 20 02 mov #544, &0x0160 ;#0x0220 c046: 60 01 c048: 03 43 nop c04a: 32 d2 eint 0000c04c <loop>: c04c: ff 3f jmp $+0 ;abs 0xc04c 0000c04e <__isr_9>: c04e: 17 83 dec r7 c050: 03 20 jnz $+8 ;abs 0xc058 c052: c2 e4 21 00 xor.b r4, &0x0021 c056: 07 46 mov r6, r7 c058: 82 55 72 01 add r5, &0x0172 c05c: 00 13 reti 0000c05e <_unexpected_>: c05e: 00 13 reti Disassembly of section .vectors: 0000ffe0 <__ivtbl_16>: ffe0: 04 c0 04 c0 04 c0 04 c0 04 c0 04 c0 04 c0 04 c0 ................ fff0: 04 c0 4e c0 04 c0 04 c0 04 c0 04 c0 04 c0 08 c0 ..N............. To get your SD Card Bootloader running in Energia you would have to replace the blink.S with SDBSL-G2553.S and change your coding style to make msp430-gcc happy.  You would also have to replicate all the code that the normal C runtime code does to create an environment for a C++ application. Basically you have to setup the .data section (copying the initial values from flash to ram), initialize the .bss section all to zero, loop through all the global c++ constructors, then call the users main function.
  11. Like
    NurseBob got a reaction from mph in MSP430FR2433 SleepSeconds 18ua   
    Have you looked at what's happening "under the hood" with CCS or similar? All things considered, I find it amazing that the current is as low as it is.  Energia is a great place to start and experiment, but it's not intended to replace coding that is far closer to the metal, er, silicon. Given it's heritage as a msp430 version of the Arduino, it's a very impressive piece of work.  But, to manage the supporting classes, and the ever-present loop, it is constrained if your're looking for ultra-low power apps.  You have already demonstrated that differential with your driverlib version.
  12. Thanks
    NurseBob got a reaction from munny in Microphone MSP430F5438A   
    A quick google search of "msp430 microphone" doesn't yield much, but there are examples for recording and playback with the msp430FG4618.
    What type of analysis??? Your intended study appears to be very broad in its potential scope.
  13. Like
    NurseBob reacted to cubeberg in How do I move from the launchpad to a custom schematic   
    Sorry - busy weekend/work week
    Enabling pull up/down resistors should be sufficient for that problem - it's recommended for low-power optimization anyway.  
    Looks like @NurseBob has done an excellent job answering everything else   
    FWIW - I like Elecrow over Seeed, etc.  I've always had good luck with them - and they have good customer service for the few times I've had any issues.
  14. Like
    NurseBob got a reaction from LoRaWAN in Using SPI and LoRa Libraries in Energia for MSP430G2553   
    >Appreciate if you can further assist me
    Unfortunately, my current system configuration doesn't support Energia builds at the moment. So, hopefully someone else will be able to help.
  15. Like
    NurseBob got a reaction from energia in Can not get LED to fade from Energia example   
    > What am I doing wrong?
    @Jacamo, really hard to say.  However, looking at the code (it always help to actually post what you wrote - saves time for looking things up...), you might want to explore increasing the delay interval so the steps, if occuring, are easier to see.  FWIW, looking at the schematic in the page you referenced, the resistor is 220 Ohm, not 10K.  Also, another FWIW,  P1.6 (pin 14) is factory connected to the green LED2 on the board.  You needn't actually add an external LED.  I had a spare LP with a G2553 (same pinout for the first 14 as your G2231, so same code works) available, pasted the code, added the jumper for LED 2 and ran the code; all works as promised.  Do you have the jumper on the LED2?  If so, that might interfere...
  16. Like
    NurseBob got a reaction from energia in pH Sensor with MSP430g2553   
    Post a schematic; there are too many ways to misinterpret your question's description without one.
  17. Like
    NurseBob got a reaction from Usama in MSP430 GPS   
    I have had no problems with TinyGPS on a MSP430F5529.  Given that the communication is Serial, have you correctly configured your '2553 for Serial?
    Your statement "doesn't seem to work" is so broad that there's virtually no way to offer any specific or more useful suggestions. 
  18. Like
    NurseBob reacted to terjeio in MSP430G2553 - Please let me know why my code is not working.   
    Did you debounce the switch signal with some kind of circuit first? If not I believe you need add a debouncer, possibly in code. MAX6816 is an easy to use chip but adds parts and cost to the design, doing it by code only needs some programming effort to make it work.
  19. Like
    NurseBob got a reaction from energia in code stuck at the end of setup   
    I'm not quie clear on your question, and at the risk that it's obvious...
    for(;;) = loop forever
    If your Engergia code has an empty loop(), and never does anything to generate a serial event, then it's going to be "stuck" in a loop that repeatedly checks for a serial event.
    So, what's in your loop() code? What do you expect to see?
  20. Like
    NurseBob got a reaction from energia in MSP430G2452 - Delayed start after uploading program with Energia   
    Have you tried the reset button after upload? Or disconnecting and reconnecting?  If so, does the blink program begin on one of those events?
    Are you running identical code in both cases?  Is the CCS version an import of the Energia project, or are you running the TI CCS blink code and something else in Energia?
    Post some code...
  21. Like
    NurseBob got a reaction from energia in SoftwareSerial Communication Issues   
    Also, where is sendrequest() ever callled?  Who's sending, who's responding? Unclear from your code snippet(s)  if anyone is sending, if one is sending, etc.  Are both running the same code?
  22. Like
    NurseBob got a reaction from energia in SoftwareSerial Communication Issues   
    > I hope the connection is all right.
    You might want to think about if you want TX->TX, or TX->RX?
  23. Thanks
    NurseBob got a reaction from Rei Vilo in MSP432 - Memory map prevented reading 0x1FFFFFxx   
    Sounds like time to read the manual.  Look at the memory map of the device and I think you'll have some insights into why you're running into problems. This is not an area where I have any other useful experience.  Of course, there's also e2e as a resource.
  24. Like
    NurseBob got a reaction from bluehash in Energia.core   
    I've had intermittent problems with various versions of CCS and Energia in the past.  After seeing your post I updated my CCS to with no issues.  However, based on your reported error message, it's worth taking a moment to go to Window->Preferences->Code Composer Studio->Products to see if Energia is still installed. 
  25. Like
    NurseBob reacted to Markers in Energia.core   
    Hi All,
    Many thanks for all your responses.
    NurseBob, you were right on the money: Energia was not installed.  I re-installed it and everything is now working as it should.
    Many thanks!
  • Create New...