Jump to content
43oh

LIJsselstein

Members
  • Content Count

    58
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by LIJsselstein

  1. So today I breadboarded an Adesto AT45Dxxxx DataFlash chip with an G2553 (TSSOP28 on a breadboard adapter) and wrote a quick test sketch in Energia using software SPI. The sketch queried the Manufacturer/Device id every second and communication was very spotty with a correct result in only about a fifth of the queries. At first I thought is was a software error so tried various things like adding delay(1-10) after pulling the CS low and stuff like that. Generally it got worse, at least not better. This got me quite confused for an hour or so but during lunch the penny dropped: what if I added
  2. beginTransaction() and endTransaction have been added to Arduino with the 1.0.6 release. These functions make sure that only one instance of SPI is able to talk to the same SPI-bus at a time, which otherwise can happen for example from within interrupt handlers. So if you have only one SPI instance then it's certainly no problem to remove the beginTransaction/endTransaction lines from the library code. The better solution (imho) would be to update the Energia SPI library to the latest Arduino standard.
  3. You can definately go very low power using Energia. I currently have a setup with g2553 launchpad (with 32kHz crystal), DS1337 RTC, SPI flash chip and various other electronics hooked up (nearly all pins used) and it consumes about 3 uA @ 3.3V when waiting for interrupts and timing of actions in LPM 3. Besides software you will need to look carefully at the other chips and busses in your system.
  4. To reduce current consumption, you could add a high side switch to the voltage divider which is controlled using a digital i/o pin and switch it on just before taking a sample. Search for high side p-channel mosfet switch to find example circuits. There are also specialst one-stop-shop ic's for ths job, like the ITS4141N that uses logic control levels and works down to about 9V.
  5. Initially I did not know how to invoke a new constructor. Some trial and error resulted in the following code in setup(). Hopefully this is useful for other users: // Re-initialize the I2C library to use the USCI hardware Wire = TwoWire(0); @@Johann, There appears to be a bug introduced in Energia 17 wrt I2C, Serial comms and MSP devices with USCI hardware. Itserik created a pull-request to fix this.
  6. A bit late to the party, but I just ordered 3 of these for EUR 10.34 each at Farnell in the normal DEV version. The LAB KIT DEV version sells at EUR 22.59 but I can't spot any differences between the two
  7. Here's another users who ran into this problem. The following code will continue to suck ~160 uA even when in LPM3. void loop() { analogReference(INTERNAL2V5); int v = analogRead(11); sleepSeconds(10); } It is solved for me when I add two lines after analogRead() to shutdown the ADC: void loop() { analogReference(INTERNAL2V5); int v = analogRead(11); // end conversion and turn off ADC ADC10CTL0 &= ~ENC; ADC10CTL0 &= ~(ADC10IFG | ADC10ON | REFON); sleepSeconds(10); } Thanks to this article. I only found this thread afterwards. This Energia behavior bu
  8. While researching the low power options I found suggestions in the forum about the sleepSeconds() function and references in msp430/wiring.c to use wakeup() in ISR's to cancel sleepSeconds() in the main loop, but these are not documented in http://energia.nu/reference. Testing sleepSeconds() and wakeup() seems to work fine using the following test code (Launchpad with MSP430G2553) althoughit looks like some libraries are incompatible. E.g. the OneMsTaskTimer timer event seems to halt code execution. Is there a writeup of the pro's/con's/best practices of using sleepSeconds() somewhere? /
×
×
  • Create New...