Jump to content
43oh

energia

Members
  • Content Count

    1,252
  • Joined

  • Last visited

  • Days Won

    64

Reputation Activity

  1. Like
    energia got a reaction from otto949otto in Cant install Energia on ubuntu help   
    There was a mistake in the instructins. I just corrected it: http://energia.nu/guide/guide_linux/
     
    It should be:
    - Open a terminal and cd to your how directory:
    cd ~
    - unpack the energia using tar.
    tar -xzf <directory you downloaded Energia>/energia-0101E00XYZ-linux64.tgz
     
    To Run Energia:
     
    In a terminal cd to the directory where you have unpacked Energia. e.g. /home/username/energia-0101E00XYZ-linux64/
     
    ./energia &
     
    Robert
  2. Like
    energia got a reaction from alphanumeric35 in AT Commands with Software Serial on MSP430   
    Which MSP430 are you using? I recently tested it on an MSP430F5529 and that worked.
    One thing to note though is that pins 3 and 4 are already used by Hardware Serial which you use in your Sketch (Serial.xyz()).
    Try changing to different pins. I would suggest you try pins 11 and 12 if you are not using those for anything else.
    Robert
  3. Like
    energia got a reaction from ahmedmibrahim in Sleep Modes with cc1310 / cc1350   
    EMT low power unfortunately is not well documented but quite simple. How low of a power the device goes into depends on what interfaces are open and what device the Sketch runs on.
     
    The quick reference:
     
    If all Sketches are in delay() the idle loop is entered. The idle loop is a TI-RTOS task that consults the power manager and then determines what level of low power it can go to. Make sure that all unused pins are in the appropriate state according to the datasheet. Usually this is output high. Make sure that sensors that are connected are put into sleep mode if you intend to go to low power. Make sure that you call the .end() function on peripherals. e.g. Wire.end(), SPI.end(), Serial.end(), etc. This releases the constraint that the peripherals .begin() functions sets in the power manager. Use inter task communication interfaces to communicate to other tasks when low power should commence. Examples of the low power intertask communication can be found in the Energia examples under File->Examples->10.MultiTasking. Typically you would want to go for semaphore of Event. Pending on a semaphore also acts as low power mechanism. If you pend, the task stops becoming runnable and wont execute again unless the semaphore is posted. Hope this helps.
     
    I do have low power example Sketches in the pipeline but I won't be able to get to the in the next month or so.
     
    Robert
  4. Like
    energia got a reaction from bluehash in Interrupts for TM4C123GXL   
    I posted a library a while ago which could be of use. It can be found here: https://github.com/energia-libraries/RotaryEncoder
  5. Thanks
    energia got a reaction from TheBharath in CC1312R1 Energia   
    Not yet but will be soon.
  6. Like
    energia reacted to StefanSch in MSP430G2 no communication   
    To solve the UART issue go to the pins_energia.h file for the selected device MSP-EXP430G2452LP
    and try to update / modify this lines:
    static const uint8_t DEBUG_UARTRXD = 4;  /* Receive  Data (RXD) at P1.2 */
    static const uint8_t DEBUG_UARTTXD = 3;  /* Transmit Data (TXD) at P1.1 */
    This seems to be wrong in the current version but i have no idea why this worked before as i could not find an update where this has been changed.
     
     
    To solve the issue with I2C you need to select the other I2C interface with
    setModule(0);
    The default mapping of the I2C interface to the pins 8 and 9 change a while ago but with the setModule you still can select the other I2C interface if available.
     
  7. Like
    energia reacted to NurseBob 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.
  8. Thanks
    energia got a reaction from unknowsman in i2C Slave not working on MSP430FR5969   
    There is a bug for slave mode which has already been fixed in the git repo. You can work-around it with the following.
    If you have the latest Energia release installed (1.8.7E21), then edit the file:
    Linux: <Energia directory>hardware/energia/msp430/libraries/Wire/utility/twi.c
    Windows: <Energia directory>hardware\energia\msp430\libraries\Wire\utility\twi.c
    macOS: <Energia.app directory>/Contents/Java/hardware/energia/msp430/libraries/Wire/utility/twi.c
    Got to line 1183 and replace:
    1183                 } else if (twi_state == TWI_MRX) {      // Master receive mode 1184                         // copy data to output register 1185                         UCBzTXBUF = twi_txBuffer[twi_txBufferIndex++]; by this: 1183                 } else if (twi_state == TWI_STX) {      // Slave transmit mode 1184                         // copy data to output register 1185                         UCBzTXBUF = twi_txBuffer[twi_txBufferIndex++];  
  9. Thanks
    energia got a reaction from unknowsman in i2C Slave not working on MSP430FR5969   
    p.s. you should use the first Sketch you posted. Also make sure that the master is setup to talk to the right address you specify in the Wire.begin(addr) call.
  10. Like
    energia reacted to NurseBob 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.
  11. Thanks
    energia got a reaction from lensdigital in How to program "raw" CC1330 chip?   
    Interesting. I did not know about these modules. Thank you for bringing this to my attention. Which module do you have (frequency)? These module are intended to be used as a network processor connected to an MCU. Looking at the user manual there is no serial loader implemented nor a way to update the firmware over the air. With that said, it seems that the modules expose the TCKC, TMSC and RESET line. You should be able to hookup these lines from the LaunchPad's XDS110 if you have one to program it with Energia. Please not that there are pin mappings specific for the LaunchPad that you might want to change.
  12. Like
    energia reacted to Rei Vilo in MSP430FR6989 pins_energia file   
    Check 
    Add a New Board to Energia
  13. Thanks
    energia got a reaction from veryalive in MSP432 Black suddenly gone from Energia   
    This board is indeed obsoleted. It was replaced by the RED board many years ago. The TI-RTOS version it was based on no longer receives updates. Hence, it was time to retire this.
    If you still like access to this board then do the following:
    Open Energia's preferences (File->Preferences or on macOS Energia->Preferences) Located "Additional Boards Manager URLs" and paste the following link into that field: https://energia.nu/packages/package_msp432_black_index.json Go to the board manager and you should see the black board appear again. Good luck with your Robot project.
    Robert
  14. Like
    energia reacted to Rickta59 in Add MSP432 support to Arduino?   
    not json but instructions given for linux
    https://github.com/RickKimball/tivac-core
    Assumes you have openocd and arm-none-eabi-gcc in your path. Probably won't work for windows. Probably will work for OSX.
  15. Like
    energia reacted to Rei Vilo in MSP430FR6989 onboard LCD drivers for Energia   
    Check the menu Files > Examples > LCD_LaunchPad.
  16. Like
    energia reacted to Rei Vilo in Sensor Controller with Energia   
    The Sensor Controller isn't supported by Energia. 
    Actually, it requires a specific IDE, called Sensor Controller Studio (link).
    I tried and played with the examples, but they are rather sophisticated.
    I'm looking for a very basic application for my Low Power Home Network Weather Monitoring with a clock (every 10 mn) and a push-button (manual) to raise an event and wake up the main core.
  17. Like
    energia got a reaction from buerni in MSP430 Serial Monitor not working   
    You might have one of those LaunchPads that comes out of the box configured to use software uart.
    On a Rev 1.5 LaunchPad, J3's RX and TX jumpers need to be set to the horizontal position to work with Serial. Also make sure that you match the baudrate set in the Sketch in the Serial monitor. In your test Sketch, you might want to add a small delay (e.g. delay(200)) at the end of the loop to not flood the Serial monitor.
    Please see the pinmap:

  18. Like
    energia reacted to mgh in Error during download   
    I don't know that any of these ideas will help, it's just what I looked at when I tried to see what the problem might be.
    When you first start the Boards Manager, do you see the message "Downloading platforms index..."?  It gets the small file http://www.energia.nu/pacakges/package_index.json .  If you can see that, then it's talking to the package server OK. I've got a slow dial-up connection, so it sits there long enough for me to read it (and wait a little, too!). If you have a fast connection then it might blip past in an instant.
    It's interesting that it wants to get a 1.0.2 release, when there's a 1.0.3 release up on the site.
    Have you made any changes in Preferences / Network? If so, could they be blocking something?
  19. Like
    energia reacted to NurseBob 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...
  20. Like
    energia reacted to NurseBob in pH Sensor with MSP430g2553   
    Post a schematic; there are too many ways to misinterpret your question's description without one.
  21. Like
    energia reacted to zeke in Infinity Loop in file "Tcp.c" , function "void tcp_slowtmr(void)"   
    My gut instinct would be to add an additional condition (a timer) to that while loop.
    I don't work with that processor so I am not sure of the implementation but here's my pseudo code:
    while ( (pcb != NULL) && (thisTimer <= ARBITRARY_MAX_WAIT_TIME) ) { ... }  
    I don't know if that makes any sense to do it that way, but that is how I am thinking. Add in a second variable that *you* have control over. Then you can have a measure of sanity of something goes off the rails.
    YMMV
  22. Like
    energia reacted to Rickta59 in Infinity Loop in file "Tcp.c" , function "void tcp_slowtmr(void)"   
    googling seems to indicate this is a known problem.
  23. Like
    energia reacted to Rickta59 in The problem about compiling "Blink" by Energia   
    this was fixed a long time ago. 
    https://github.com/robertinant/EnergiaNG/issues/10
    are you sure you have the latest stuff?
  24. Like
    energia reacted to zeke in MSP430FR6989: Serial port monitor is not working   
    Hi @Salibensuleiman
    Wow! That's a wall of text that is impossible to understand.
    Please use the code "<>" tags on your software.
    For example,  here is your code
    #include <LCD_Launchpad.h> #include <driverlib.h> #include <SPI.h> #include <LiquidCrystal.h> #include <driverlib.h> // Required for the LCD //#include <LiquidCrystal_I2C.h> //LiquidCrystal lcd; void setup() { // put your setup code here, to run once: //analogFrequency(10000); Serial.begin(9600); SPI.begin(); } float y11 = 0.0; float y12 = 0.0; float y13 = 0.0; float y21 = 0.0; float y22 = 0.0; float y23 = 0.0; float y31 = 0.0; float y32 = 0.0; float y33 = 0.0; float Ub11, Ub12, Ub13, Ub21, Ub22, Ub23, Ub31, Ub32, Ub33; float IN11, IN12, IN13, IN21, IN22, IN23, IN31, IN32, IN33; float y11New, y12New, y13New, y21New, y22New, y23New, y31New, y32New, y33New; void loop() { // put your main code here, to run repeatedly: // //Diagonal input // float U11=1; float U12=-1; float U13=1; // float U21=-1; float U22=1; float U23=-1; // float U31=1; float U32=-1; float U33=1; //Cross input float U11 = -1.0; float U12 = 1.0; float U13 = -1.0; float U21 = 1.0; float U22 = 1.0; float U23 = 1.0; float U31 = -1.0; float U32 = 1.0; float U33 = -1.0; //Templates A and b //A: float A11 = 0.045404; float A12 = 0.046816; float A13 = 0.046482; float A21 = 0.046741; float A22 = 4.0472; float A23 = 0.046741; float A31 = 0.046482; float A32 = 0.046816; float A33 = 0.045404; //b float b11 = 0.063908; float b12 = -0.061448; float b13 = 0.079005; float b21 = -0.061448; float b22 = 0.052166; float b23 = -0.061448; float b31 = 0.079005; float b32 = -0.061448; float b33 = 0.063908; //I float I = 0.047155; // float y11 = analogRead(A0); // float y12 = analogRead(A1); // float y13 = analogRead(A2); // float y21 = analogRead(A3); // float y22 = analogRead(A0.7); // float y23 = analogRead(A5); // float y31 = analogRead(A6); // float y32 = analogRead(A7); // float y33 = analogRead(A8); int counter = 0; if (counter == 0) { y22New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub22 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y11New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub11 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y12New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23; Ub12 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23; y13New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23; Ub13 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23; y21New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub21 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y23New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub23 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; y31New = y21 * A21 + y22 * A22 + y31 * A31 + y32 * A32; Ub31 = U21 * b21 + U22 * b22 + U31 * b31 + U32 * b32; y32New = y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub32 = U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y33New = y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub33 = U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; IN11 = y11New + Ub11; IN12 = y12New + Ub12; IN13 = y13New + Ub13; IN21 = y21New + Ub21; IN22 = y22New + Ub22; analogWrite(35, IN22); //pin 2.2 IN23 = y23New + Ub23; IN31 = y31New + Ub31; IN32 = y32New + Ub32; IN33 = y33New + Ub33; y11 = 0.7 * tanh(2.0 * IN11); y12 = 0.7 * tanh(2.0 * IN12); y13 = 0.7 * tanh(2.0 * IN13); y21 = 0.7 * tanh(2.0 * IN21); y22 = analogRead(A8); //0.7*tanh(2*IN22)+I; pin 9.0 delay(500); y23 = 0.7 * tanh(2.0 * IN23); y31 = 0.7 * tanh(2.0 * IN31); y32 = 0.7 * tanh(2.0 * IN32); y33 = 0.7 * tanh(2.0 * IN33); counter = 1; } else { y22New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub22 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y11New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub11 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y12New = y11 * A11 + y12 * A12 + y13 * A13 + y21 * A21 + y22 * A22 + y23 * A23; Ub12 = U11 * b11 + U12 * b12 + U13 * b13 + U21 * b21 + U22 * b22 + U23 * b23; y13New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23; Ub13 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23; y21New = y11 * A11 + y12 * A12 + y21 * A21 + y22 * A22; Ub21 = U11 * b11 + U12 * b12 + U21 * b21 + U22 * b22; y23New = y12 * A12 + y13 * A13 + y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub23 = U12 * b12 + U13 * b13 + U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; y31New = y21 * A21 + y22 * A22 + y31 * A31 + y32 * A32; Ub31 = U21 * b21 + U22 * b22 + U31 * b31 + U32 * b32; y32New = y21 * A21 + y22 * A22 + y23 * A23 + y31 * A31 + y32 * A32 + y33 * A33; Ub32 = U21 * b21 + U22 * b22 + U23 * b23 + U31 * b31 + U32 * b32 + U33 * b33; y33New = y22 * A22 + y23 * A23 + y32 * A32 + y33 * A33; Ub33 = U22 * b22 + U23 * b23 + U32 * b32 + U33 * b33; IN11 = y11New + Ub11; IN12 = y12New + Ub12; IN13 = y13New + Ub13; IN21 = y21New + Ub21; IN22 = y22New + Ub22; analogWrite(35, IN22); //p.n 2.2 IN23 = y23New + Ub23; IN31 = y31New + Ub31; IN32 = y32New + Ub32; IN33 = y33New + Ub33; y11 = 0.7 * tanh(2.0 * IN11); y12 = 0.7 * tanh(2.0 * IN12); y13 = 0.7 * tanh(2.0 * IN13); y21 = 0.7 * tanh(2.0 * IN21); y22 = analogRead(A8); //0.7*tanh(2*IN22)+I; pin9.0 float voltage = Serial.println(y22 * 3.0 / 1023.0); y23 = 0.7 * tanh(2.0 * IN23); y31 = 0.7 * tanh(2.0 * IN31); y32 = 0.7 * tanh(2.0 * IN32); y33 = 0.7 * tanh(2.0 * IN33); } }  
     
  25. Like
    energia reacted to zeke in MSP430FR6989: Serial port monitor is not working   
    Concentrate on one problem at a time.
    Create a new project.
    Write a program that tests out only the serial port.
    Create another project that tests out only the LCD.
    Divide and conquer!!!
    Once you have those working then you can get back to that crazy math you are trying to do!
     
×
×
  • Create New...