Jump to content

energia

Members
  • Content count

    1,150
  • Joined

  • Last visited

  • Days Won

    53

energia last won the day on February 7

energia had the most liked content!

About energia

  • Rank
    Level 4

Contact Methods

  • Website URL
    http://www.energia.nu
  1. Energia port value for RED_LED

    What in your opinion is easier in pins_energia.h that the pin map that we posted. We like to get feedback and get educated on how we can improve on our education. So any feedback that you can provide will be very valuable to us. Thanks, Robert
  2. Energia port value for RED_LED

    Great to hear you got it to blink. That is the first step! There is no pin 108 in Energia land for the EK-TM4C1294XL. Pin 108 is a pin on the chip which is mapped to Energia pin 81 (LED1). See pinmap here: http://energia.nu/pin-maps/guide_tm4c129launchpad/.
  3. Energia IDE fails with fatal error: MSpanList_Insert

    Please see work around here:
  4. attachInterrupt() takes a long time

    When you are in an ISR interrupts are disabled and hence no other ISR's will be executed until the first ISR exits. This is also the reason why you should NOT do extensive work in the ISR that takes a long time as you will eventually miss interrupts. In the linux world this is called bottom an top half. The bottom half does minimal work like setting flags / clearing interrupts. The top half then uses the flags set by the ISR to determine what work needs to be done in mainline. Robert
  5. There is a build script located here: https://github.com/energia/Energia/blob/master/build/linux/dist/tools/build-mspgcc. courtesy of @Rickta59.
  6. Not that P2_2, etc are "friendly" names only that map to a pin number and point into the arrays digital_pin_to_port[], digital_pin_to_bit_mask[], etc. On a side note, It is discouraged to use these friendly names since they are not portable between all launchpads. Instead use pin numbers. With that said, in order to use the pins currently exclusive to the LCD, you need to add them to the following arrays in pins_energia.h: digital_pin_to_port[] digital_pin_to_bit_mask[] Add them to the end of the arrays. You will have to choose which pin goes at which position in the array. The position in the array determines the pin number you use in your Sketches for a particular pin. e.g. if you were to add P2.2 to the end of the arrays it would look something like this: const uint8_t digital_pin_to_port[] = { NOT_A_PIN, /* 0 - pin count starts at 1 */ ..... P2, /* 21 - P2.4 */ P2, /* 22 - P2.3 */ P4, /* 23 - P4.0 */ P1, /* 24 - P1.2 */ P2, /* 25 - P2.6 */ P2, /* 26 - P2.2 */ }; const uint8_t digital_pin_to_bit_mask[] = { NOT_A_PIN, /* 0 - pin count starts at 1 */ ...... BV(4), /* 21 - P2.4 */ BV(3), /* 22 - P2.3 */ BV(0), /* 23 - P4.0 */ BV(2), /* 24 - P1.2 */ BV(6), /* 25 - P2.6 */ BV(2), /* 26 - P2.2 */ }; With this addition you can use P2.2 as pin 26 in your Sketch as GPIO. void setup() { pinMode(26, OUTPUT); digitalWrite(26, HIGH); } Be careful with modifying the core since it is controlled by Energia. An update to the core will undo all the changes. Robert
  7. attachInterrupt() takes a long time

    @Fmilburn is right, you should never do work that takes a long time in the ISR. This is because while in the ISR, all interrupts are disabled. The below Sketch works as expected where detachInterrupt()/attachInterrupt() do not cause the 2 seconds delay as you observed. The RED_LED initially turns on after reset. Pressing PUSH2 will turn it off after a 200 ms debounce. myISR will detach from myISR and attach to myISR2. Pressing PUSH2 one more time will fire myISR2 and turn the RED_LED off permanently. Also note that I activated the PULLUP on PUSH2. Make sure that you have the correct PULLUP/PULLDOWN state on the pin depending on the desired RISING/FALLING edge of the interrupt. volatile bool isr_flag = false; volatile bool isr_flag2 = false; void setup() { // put your setup code here, to run once: pinMode(RED_LED, OUTPUT); digitalWrite(RED_LED, HIGH); pinMode(PUSH2, INPUT_PULLUP); attachInterrupt(PUSH2, myISR, FALLING); } void loop() { // put your main code here, to run repeatedly: if (isr_flag == true) { digitalWrite(RED_LED, LOW); } if (isr_flag2 == true) { digitalWrite(RED_LED, HIGH); } } void myISR() { static unsigned long last_interrupt_time = 0; unsigned long interrupt_time = millis(); // If interrupts come faster than 200ms, assume it's a bounce and ignore if (interrupt_time - last_interrupt_time > 200) { isr_flag = true; detachInterrupt(PUSH2); attachInterrupt(PUSH2, myISR2, FALLING); } last_interrupt_time = interrupt_time; } void myISR2() { static unsigned long last_interrupt_time = 0; unsigned long interrupt_time = millis(); // If interrupts come faster than 200ms, assume it's a bounce and ignore if (interrupt_time - last_interrupt_time > 200) { isr_flag = false; isr_flag2 = true; } last_interrupt_time = interrupt_time; }
  8. attachInterrupt() takes a long time

    What do you mean with "call attachInterrupt at the end of a service Routine". Can you please post a simplified Sketch that shows the issue? Robert
  9. Looking at the Arduino IDE sources on which Energia is based, this is unfortunately not possible. I also do not see a potential work-around where this would work. Robert
  10. As @Fmilburn mentioned, the FR6989 has a second serial available on pins 3 and 4. Use Serial1.xyz to use the second serial port. SoftwareSerial was written for the MSP430G2553 to make available a second Serial port. Robert
  11. I have not seen this issue before and am not able to reproduce it on my Windows 10 machine. Can you please paste the entire output of the black window for the upload? Just to make sure, you are seeing this with both CCS and Energia? Could you please try uploading a simple program with CCS cloud at http://dev.ti.com/ide/ Thanks, Robert
  12. Serial port does not exist

    No Wonder . You need the following jumpers installed! VCC, TEST, RST, RXD and TXD Robert
  13. Serial port does not exist

    Can you post the entire (orange) output of MSPDebug? The only way I am able to reproduce this is when I take the MSP430G2553 out of the DIP socket. Is the MSP430 seated correctly in the DIP socket?
  14. This seems pure CC3200 SDK code and not related to Energia. I would encourage you to post SDK related questions on e2e here as it is monitored by the CC3200 experts. https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968
×