Jump to content

energia

Members
  • Content Count

    1,250
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by energia

  1. Energia 0101E0006 sets the ACLK to internal VLO which is about 12KHz typical. The following patch should fix it: --- a/hardware/msp430/cores/msp430/wiring.c +++ b/hardware/msp430/cores/msp430/wiring.c @@ -78,7 +78,7 @@ void initClocks(void) /* SMCLK = DCO / DIVS = nMHz */ BCSCTL2 &= ~(DIVS_0); /* ACLK = VLO = ~ 12 KHz */ - BCSCTL3 |= LFXT1S_2; + //BCSCTL3 |= LFXT1S_2; } #define SMCLK_FREQUENCY F_CPU
  2. Servo lib has not been ported to msp430 yet hence it was not included in the release. A enhancement request (https://github.com/energia/Energia/issues/69) has been files. pbrier, one of the project members, is working on it. Once it has been ported a pull request will show up in that ticket. The library will show up in hardware/msp430/libraries once we pull it into master.
  3. Happy to hear you root caused it. Let us know if the sophos forum brings any answers.
  4. Hi Sir Fredrik. No rush. I did a quick fix and used the random from libc. This is not msp430-libc but the random.c imported from the original libc. This is the same random and srandom that AVR uses. I would still love to have a more sophisticated random number generator. Your implementation could be a good complementary random number generator in the form of a library..
  5. energia

    Up we go

    Or you could go to https://github.com/energia/Energia/wiki/Getting-Started and get them from there. Robert
  6. Hi clyvb, Couple of questions: - Is this with version 0101E0006? - What is your version of OS X? - Did you have the same issue with the previous version? - Was your LaunchPad plugged in? I don't have access to a clean OS X machine but will see if I can set something up over the weekend. Robert
  7. msp430-libc does not implement atop(). http://mspgcc.git.sourceforge.net/git/g ... ce;hb=HEAD You could try the mailing list and see if Peter has any plans to implement this. Mailing list is here: https://lists.sourceforge.net/lists/lis ... gcc-users/ I try to avoid floats all together. On MSP430 it bloats to code by about 4k and on avr it is about 3k. Floating point operations are slow too due to emulation.
  8. Energia project is here: https://github.com/energia/Energia The contribution procedure needs to be formalized but in a nut shell. If you just want to submit a patch or 2 then send us the patch and we will take care of it. Users that want to actively participate in Energia are added as members and you get full access. New code/bug fix follow this process https://github.com/energia/Energia/wiki ... ew-process.
  9. randomSeed() and random() not are not yet implemented (see issue 63 on github https://github.com/energia/Energia/issues/63). Sir Ferdek, I would love to have a look at your random number code. Would you consider contributing it to Energia?
  10. energia

    Up we go

    Thank for the kind words! You probably already figured out that there is a TimerSerial implementation for devices that do not have hardware serial (USCI). Example is in File->Examples->TimerSerial. As for the low power modes, it is on the TODO list. robertinant (Robert)
  11. Put a new wiki page up @ https://github.com/energia/Energia/wiki/Hardware. Hope this helps clearing things up. The pin numbering is very simple as long as you follow the pin numbering on the header :-)
  12. This is definitely a bug and will get it fixed. To echo what Rickta59 said, the TImerSerial chews up about 1k of flash and probably half of the available RAM. It will work on a msp430g2231 but you won't have much left for the sketch itself.
  13. Bug is fixed. Pull request with fix has been posted for review: https://github.com/energia/Energia/pull/64/files --- a/hardware/msp430/cores/msp430/wiring_digital.c +++ b/hardware/msp430/cores/msp430/wiring_digital.c @@ -79,9 +79,17 @@ void digitalWrite(uint8_t pin, uint8_t val) uint8_t bit = digitalPinToBitMask(pin); uint8_t port = digitalPinToPort(pin); volatile uint16_t *out; + volatile uint16_t *sel; if (port == NOT_A_PORT) return; + /* + * Clear bit in PxSEL register to select GPIO function. Other functions like analogWrite(...) + * will set this bit so need to clear it. + */ + sel = portSelRegister(port); /* get the port function select register address */ + *sel &= ~bit; /* clear bit in pin function select register */ + out = portOutputRegister(port); if (val == LOW) {
  14. This is confirmed to be a bug. digitalWrite leaves the pin in PWM mode. A digitalWrite drives the line high and then PWM takes over again immediately after that. Thank you for the report. WIll file a bug and post the patch in this thread. A way around this is: void setup() { pinMode(GREEN_LED, OUTPUT); } void loop(){ analogWrite(GREEN_LED,254); // write with 255 does a digitalWrite(, HIGH) so will not work delay(2000); analogWrite(GREEN_LED,14); delay(2000); }
  15. No other fixes have been done in this area. Code should work but you might have hit a new bug. I will have a look at it with an o-scope this afternoon and see if I can reproduce it.
  16. Pin numbering is according to the numbering of the header pins on the silk screen. Alternatively you can use predefined pin names: P1_0, P1_2 .... P2_5. There are also defines for the LED's and button: RED_LED, GREEN_LED, PUSH2. The table below can also be found in the file hardware/msp430/variants/launchpad/pins_energia.h. Link to this file on github: https://github.com/energia/Energia/blob ... _energia.h. Will put this up on the Wiki over the weekend. +-\/-+ VCC 1| |20 GND (A0) P1.0 2| |19 XIN *(TXD/RXD) (TA0.0) (A1) P1.1 3| |18 XOUT *(TXD/RXD) (TA0.1) (A2) P1.2 4| |17 TEST (A3) P1.3 5| |16 RST#$ *(TA0.2) (A4) P1.4 6| |15 P1.7 (A7) (SCL) (MISO) depends on chip (TA0.0) (A5) P1.5 7| |14 P1.6 (A6) (TA0.2) (SDA) (MOSI) P2.0 8| |13 P2.5 P2.1 9| |12 P2.4 P2.2 10| |11 P2.3 +----+ *(TA0.2): Only flavors with a comparator have TA0.2 on PIN 6 *(TXD/RXD): TimerSerial: P3 = TXD, P4 = RXD; Hardware Serial: P3 = RXD, P4 = TXD
  17. Which release are you on? Release 0101E0006 has a bug. TA0CTL is setup incorrectly for T0A1 which is P1.6 (GREEN_LED). The fix has already been checked into master. Diff is here: https://github.com/energia/Energia/comm ... 9b3ed05479 analogWrite(GREEN_LED, 255) should work though. Will look into it. Robert
  18. Code has been removed. This code should not have ended up in Energia without the proper attribution to the original author in the files in question. As the project manager I apologize for not catching this when it got pushed. Robert
  19. Hi Yan, You can set XTAL as ACLK source and can do so by setting BCSCTL3 in wiring.c. But I am sure you already figured that one out :-) It would be nice if this was possible using a higher level API. Anyways, happy you got it to work! -robertinant
  20. Note that Energia uses the internal VLO for ACLK and not the 32KHz XTAL. See hardware/msp430/cores/msp430/wiring.c /* ACLK = VLO = ~ 12 KHz */ BCSCTL3 |= LFXT1S_2; This makes me realize that there is there is no way for the user to set the ACLK to the external XTAL using a higher level API. -robertinant
  21. Energia, as of yesterday, has it's own Forum here on 43oh.com. The forum is at: Board index > Community > Projects > Energia Please use the Energia forum to get help with the Energia project. robertinant
  22. Hi bobricius, Same answer as for the OS X question in thread. A binary release is available on github for Windows in the download section of the Energia project. This release is outdated though. A new release will be done this weekend and will be posted in the same location. robertinant
  23. Hi blackswords, A binary release is available on github for OS X in the download section of the Energia project. This release is outdated though. A new release will be done this weekend and will be posted in the same location. robertinant
  24. energia

    Up we go

    I would like to dedicate my first post on this forum to all the Energia team members who have supporting me in the first hours of the project. Without their support Energia would not have been possible. A special thanks to Rei Vilo and Rickta59 for their invaluable contribution. robertinant
×
×
  • Create New...