Hi,
I also posted this thread in the MSP430 forum, but it seems like it's mostly a CCS problem.
Link: http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/p/122923/439259.aspx#439259
I'm trying to use the eZ430-RF2500 Module to communicate between the Cymbet CBC-Eval-09 Energy Harvesting Module and the Computer. The original Cymbet code which is compiled in IAR works fine, and it uses about 0.3uA most of the time. But if I compile the same code with CCS v4 I measure a current draw of 5mA. The problem is, that the energy harvesting kit is unable to supply this amount of power over long periods of time, and it crashes pretty quickly.
I tried making just about the lowest power code I could find:
#include "bsp.h"
#include "mrfi.h"
#include "bsp_leds.h"
#include "bsp_buttons.h"
#include "nwk_types.h"
#include "nwk_api.h"
#include "nwk_frame.h"
#include "nwk.h"
#include "msp430x22x4.h"
#include "vlo_rand.h"
void main (void)
{
WDTCTL = WDTPW + WDTHOLD; // Turn off Watchdog
BSP_Init();
SMPL_Init(0);
SMPL_Ioctl( IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_SLEEP, 0 ); //Turn off Radio
while(1)
{
__bis_SR_register(LPM4_bits); //Clocks off
}
}
Again, if I compile with IAR it works fine, if I compile with CCS it draws too much power.
I can't use the IAR for the whole project since it takes a bit longer than 30 days and uses a bit more code than the trial version allows so I'm pretty much stuck here.
Is there some setting on CCS I have to change to make it work properly? Do I have to go into the included files and change them? The files Cymbet used are a bit older and not compatible with CCS so I was not able to completely switch them out.
It seems to me the Low Power Mode 4 never really gets turned on in the CCS code, though if I go into debug mode(drawing power from the PC, so I can't measure the current there ) the code seems to stop when it gets to that point. Or if I try it with LMP3 and ACLK on a 10 second timer that ends LMP3 it stops for about 10 seconds, then jumps to the interrupt, turning off LMP3 then in the while loop back to LMP3 etc.
One person said it might not shut off the radio completely since I turn off the clocks right after, but I tried switching the commands and using a for loop and that didn't help.
Another user told me that CCS is 1GB big and I set something wrong.
By the way, I used the Wireless Sensor Monitor project given with the eZ430-RF2500 Module as the base of my project so maybe the problem is somewhere in there? Does it import some settings to CCS? I didn't change any other settings besides Build Steps: Create flash image: Intel-HEX.