Jump to content

p2baron

Members
  • Content Count

    31
  • Joined

  • Last visited

  • Days Won

    1

p2baron last won the day on February 14 2014

p2baron had the most liked content!

About p2baron

  • Rank
    Advanced Member
  1. Marking this as solved. I have raised a new issue at github @@energia https://github.com/energia/Energia/issues/773
  2. I think I've found the culprit with the help of this article: http://www.elevendroids.com/2013/06/code-recipe-reading-msp430-power-supply-voltage-level/ If I add "ADC10CTL0 &= ~ENC;" to wiring_analog.c the problem is solved. i.e. #if defined(__MSP430_HAS_ADC10__) ADC10CTL0 &= ~ADC10ENC; // disable ADC ADC10CTL1 = ADC10SSEL_0 | ADC10DIV_4; // ADC10OSC as ADC10CLK (~5MHz) / 5 ADC10CTL0 = analog_reference | // set analog reference ADC10ON | ADC10SHT_3 | ADC10IE; // turn ADC ON; sample + hold @ 64
  3. It has something to do with the analogRead function. After I've sampled the internal ADC the average power consumption rises even though it goes into LPM4.
  4. @@Fmilburn wakeup is indeed needed @@spirilis I'm using Energytrace to measure power consumption I've tried setting the anologReference back to default. Unfortunately that doesn't help. attached are three screenshots. The first one is the EnergyTrace log without calling reportVcc() and the second one with. The third screenshot shows the debug screens from CCS Cloud. It is always calling the suspend() function. I'm a bit lost. Why is the MCU unable to suspend? Are there other thing I can check?
  5. Thanks for all the suggestions. I tried debugging the code in CCS cloud. Thanks for the tip. I did not even know that CCS Cloud existed! When debugging I see that the code is functioning fine and the the suspend() code is always called/entered. Two questions. Do I always need to clear an interrupt? Is the wakeup call even needed? Verstuurd vanaf mijn SM-G920F met Tapatalk
  6. 1. Yes everything is working fine. Suspend is also working fine execpt once I've called reportVcc() it is unable to suspend again. 2. I don't have much experience with CCS. I'm also having troubles setting up CCS. After I've imported my Energia sketch and do a build I receive the following error: C:/Users/Pieter/Google Drive/03 - Workspace/CSS/lpmsp430g2553_core/Debug\liblpmsp430g2553_core.a(main.o): In function `main': C:/Users/Pieter/Google Drive/02 - Apps/energia-0101E0016/hardware/msp430/cores/msp430/main.cpp:7: undefined reference to `setup' C:/Users/Pieter/Google Drive/02 - Apps/energia-0101E0016/hardware/msp430/cores/msp430/main.cpp:10: undefined reference to `loop' collect2: ld returned 1 exit status gmake: *** [mailboxsensor_v6-1.out] Error 1 gmake: Target `all' not remade because of errors.
  7. I am currently working on a low power application. Using the MSP-EXP430FR5969 and the energytrace functionality in CSS I'm finally able to monitor the power usage of my sketch. (thanks for the writeup Frank!). I notice that if I call the following function my MSPG2553 is unable to suspend. // returns VCC in millivolts int getVCC() { // start with the 1.5V internal reference analogReference(INTERNAL1V5); int data = analogRead(ANALOG_HALFVCC_INPUT); // if overflow, VCC is > 3V, switch to the 2.5V reference if (data==0x3ff) { analogReference(INTERNAL2V5); data = (int)map(analogRead(ANALOG_HALFVCC_INPUT), 0, 1023, 0, 5000); } else { data = (int)map(data, 0, 1023, 0, 3000); } return data; } Can anybody tell me why this happens? The complete sketch is in the attachment. It is a wireless sensor that tells me when the mailman delivered the mail. mailboxsensor_v6-1.ino
  8. Just tried this. I received this error when I tried to start energytrace: A firmware update is required for the MSP430 Debug Interface You can solve this by downloading the MSP430 flasher from the TI website and running the command "MSP430Flasher.exe -s: i.e. C:\TI\MSP430Flasher_1.3.7>MSP430Flasher.exe -s
  9. Solved. See this thread: http://forum.43oh.com/topic/5465-problem-with-capacitive-touch-library/
  10. @@zormino Thanks, that solved the problem for me!! @@energia Robert, sorry for the late reply. Here are my answers: 1: What are you using as the sensing pad? A piece of breadboard wire 2: What are you using as the power supply for the MSP430? Just a plain USB charger (LG, 5v, 800mA) 3: Is this a LaunchPad or is the MSP430 standalone (e.g. soldered onto a breadboard)? I used the launchpad Zormino's solution fixed the problem for me. I am unsure why I am having this problem but you don't.
  11. Robert is the Captouch-master. @@energia do you know a way to debug this?
  12. @@spirilis thanks. I will handle that in the main loop, I basically want to stay in LPM3/4 mode all of the time except when an interrupt occurs. Do I need to have sleepsecond(xxx) in the main loop?
  13. I am currently working on a low power mailbox sensor which notifies me when I recieve (snail) mail and when it is picked up. (I live in an appartment and my mailbox is in the central staircase) I've implement the changes from both Robert and Spirillis to enable low-power interrupts. This is the code: #include <x10rf.h> //https://github.com/p2baron/x10rf #define intpin1 P1_2 // Sensor on the outer lid <- used by mailman to deliver mail #define intpin2 P1_3 // Sensor on the inner lid <- used by me to pickup mail #define txpin P2_7 // Signal pin for 433Mhz module #define txvcc P2_6 // VCC oun for the 433Mhz module #define reps 4 // Number of times the RF message should be send. x10rf myx10 = x10rf(txpin,0,reps); void setup() { for(uint8_t i;i<20;i++) pinMode(i, INPUT_PULLDOWN); // Put all Pins in INPUT_PULLDOWN (see http://forum.43oh.com/topic/4984-low-power-mode-first-sketch/) myx10.begin(); pinMode(intpin1,INPUT_PULLUP); pinMode(intpin2,INPUT_PULLUP); pinMode(txvcc,OUTPUT); digitalWrite(intpin1, HIGH); digitalWrite(txvcc, LOW); attachInterrupt(intpin1, igotmail, CHANGE); attachInterrupt(intpin2, pickedupmail, CHANGE); } void loop() { sleepSeconds(200); } void igotmail() { uint8_t _state = digitalRead(intpin1); digitalWrite(txvcc, HIGH); if (_state == 0) { myx10.x10Security(3,0x04); // Send status alarm } sleep(10); digitalWrite(txvcc, LOW); sleepAbort(); } void pickedupmail() { uint8_t _state = digitalRead(intpin2); digitalWrite(txvcc, HIGH); if (_state == 0) { myx10.x10Security(3,0x84); // Send status normal } sleep(10); digitalWrite(txvcc, LOW); sleepAbort(); } My question is: Do I need to sleep in the main loop? And can I use "sleep" in the interrupt routines?
  14. I'm having similiar issue. Never managed to resolve this. I suspect this has something to do with the size of the object that is being used as the touchpad. Also the power supply seems to make a difference. With some cheap usb-charger the MCU constantly registered touches that weren't there.
  15. Please note that the precompiled Openwrt binaries contains ACM drivers that contain a bug. When your MSP430 spits out serial messages before you open the serial port (in python or bash) the driver crashes and no communication is possible. Wasted a couple of hours figuring that out. :-( This isn't a problem when the OpenWRT devices initiates communication. You can fix this by modifying the drivers and compiling OpenWRT yourself. Verstuurd vanaf mijn HTC One met Tapatalk
×
×
  • Create New...