This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541 in Customized SensorTag : Download and Debug is OK but it doesn't work without CC Debugger connection

Other Parts Discussed in Thread: CC2541

Hi there,

We have a customized version of sensor tag which has CC2541, accelerometer, gysroscope, magnetometer, IR sensor and an added USB port to charge the rechargeable battery which is connected to the board. 

We can connect the CC Debugger (Just these 5 pins: Reset, Ground, Target Voltage, Debug Clock and Debug Data) in a proper way to our PCB via USB and I can get a green LED on PCB and 'download and debug' it with IAR workbench 8081 without any problem.

Like Sensor Tag: there is two LEDs. when I press the side key , first LED start blinking and I can see my customized sensor tag in my iPhone app without any problem.

But the problem is: if I disconnect the board from the CC Debugger, and power it by USB, power supply or  fully charged battery it doesn't work and it needs the CC Debugger in loop to work (the second LED keep blinking but nothing happen).  If I connected back the  CC Debugger it works. If I disconnect and connect the debugger couple of times then it seems the CC2541 doesn't work properly anymore and I need to program it again.

I Checked OAD as well but I got the same problem.

At the same time we have a normal sensor tag which works with the same CCDebugger and embedded code and I can run it even after disconnecting the CC Debugger. So it couldn't be the embedded code or CC Debugger. 

Also, If I download the HEX file with flash programmer, even with CC Debugger in loop it gets off after a second.

This is a very important deadline and I appreciate everybody's help and comments. I would be happy to share more information, pictures, schematic if its needed.

Thanks

Bam

  • Hello,

    Try disabling sleep and see if that has any impact.  Can you tell if some code executes before failure?

    xPOWER_SAVING in compile options.

    BR,

    -Greg

  • Hi Greg,

    I found another hint by chance but You are right as well.

    First I've got linker error since I was running sensortag.eww of  BLE stack 1.4 with IAR 8.30

    So I solved it with help of this:

    http://e2e.ti.com/support/low_power_rf/f/538/p/305764/1069645.aspx

    hopefully its a stable work around

    then I disabled POWER_SAVING as mentioned here :

    http://e2e.ti.com/support/low_power_rf/f/538/t/235981.aspx#828065

    What does power saving option mean? It means our PCB won't go to sleep mode at all?

    Thank

    bam

  • Hello,

    Disabling power saving will prevent sleep PM2 which uses the 32KHz crystal to wake up. Debugger keeps MCU awake while still executing sleep code functionality.  PM2 will draw about .9uA, while CPU active will draw about 6-7mA.  I recommend using sleep of course, but this is easy way to identify of 32Khz crystal or wake up is the issue.

    BR,

    -Greg 

  • Thanks Greg,

    So, with all given facts, How we can solve the problem without disabling power saving mode.

    Bam

  • Hello,

    If disabling PM solves the issue, then most likely there is some issue with 32Khz crystal. Is there a 32KHz crystal on the board?  For example, our USB dongle does not have a crystal, as it is powered all the time. internal oscillator  ROSC will work for basic advertising, but will not work for connections since it is not accurate enough.

    Check out the HW user guide for some more info on Sleep timer and OSC settings.. 

    BR,

    -Greg

  • Hi Greg

    Sorry for late reply, 

    I've checked with our hardware designer and he told me there is a crystal on our board like sensortag.

    Please find the attached schematic and take a look at that.

    Now, the board works reliably untill drain completely the battery (It happen in 4-5 hours) then we need to charge it and use it again (after charging that again its not that much reliable). Is there anyway to activate the sleep mode with current situation we have?

    Appreciate your help

    Bam

    Thanks

    Bam

    EW0001_SCH.pdf
  • Hello,

    I would run this experiment. Build and run SimpleBlePeripehral for EM. In compile options, disable HAL_KEY, HAL_LCD,HAL_LED.   This will give you an image that has power saving active, and will run without any HW dependencies.  You should be able to observe PM2 currents (.9uA) on this. 

    BR,

    -Greg