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.

Red LED shown when removing CC2650STK from debugging

Hi,

I hope someone can help me with an issue I am having with the Sensortag 2.0

I am running a modified SensorTag (BLE 2.1) application where everything is working as it should as long as the device is connected to USB (debugger).

My issue begins when I disconnect the SensorTag from USB, immediately the red LED begins glowing when I remove the debugger shield and the Sensortag is not advertising.

The red LED stops glowing when the debugger shield is re-attached (no LED at all), when I plug in the USB cable to the shield at this point, the red LED comes back on.

The only place in the code I can find any reference to LED1 is in SensorTag.c:

  case GAPROLE_ERROR:
    SensorTag_resetAllSensors();
    PIN_setOutputValue(hGpioPin,Board_LED1, Board_LED_ON);
    LCD_WRITES_STATUS("Error");
    break;

However, I have tried to remove/uncomment the line which activates the LED, without any change in behavior after rebuilding and flashing.

Since I cannot troubleshoot this issue when connected to the debugger (everything is working as expected when connected to debugger & USB) I am out of ideas at the moment...

Can it be something with the TI-RTOS stack?

I will be very grateful for any insight or suggestions on where to go from this point.

Regards,

Joakim

  • Hello Joakim,

    I you power up with USB you cannot dynamically switch to battery power unless a power reset is performed. Have you made any changes that exceed the max supply current of the CR2032 battery? One option would be to connect a power supply to the battery leads on the SensorTag PCB and measure how much current you are actually using.

    Best wishes
  • Hi JXS and thanks for your suggestion!

    I have not made any substantial changes which would increase the power consumption, only modified the accepted range of periods on the IMU board (but which is only changed when writing the characteristics), so it should not accept the power consumption at startup/advertising I think.

    I solved the issue by starting over with the SensorTag project and recompiling. Oddly enough it did not solve the issue on the first debug/flash, it took 2-3 debug sessions before the "clean" SensorTag rebuild was working again.

    Is there some way to be sure that all RAM and Memory is completely wiped between different debug/flashing sessions?

    Sometimes I seems to be getting completely different behavior while on the debugger and a different when the running only on battery and without the debugger shield which seems weird, maybe I am doing something wrong oir there is a setting in Code Composer Studio which causes my issues...

    Thanks again!

  • For what it's worth, I am experiencing very similar issues and posted here: e2e.ti.com/.../449058

    I also tried compiling the fresh SensorTag source code (no modifications), but the Red LED after debugger disconnect is not going away. The only Red LED enables are inactive in my code as well. Is there something buried in the stack that enables the Red LED for a memory issue?

    The precompiled SensorTag HEX file in the accessories folder works though, so I'm pretty sure it's not a HW issue. But can't use this for customization of course...

    Also have tried with two different SensorTags and still the same issue occurs.
  • Joakim - can you please share which compiler and TI RTOS versions you used to successfully get the Red LED issue to go away?

    Thank you,
    Nishant
  • I have the same problem
  • Solved!

    Build & download the BIM_extflash project. The BIM must be programmed before reprogramming the Application & Stack images.
    http://processors.wiki.ti.com/index.php/CC2650_SensorTag_User's_Guide#Building_the_SensorTag_Firmware

    Note: If you use SmartRF Flash Programmer 2, use erasing "All unprotected pages" for programming BIM image and "Pages in image" for APP and STACK images.

  • Hi and thanks for all the good advice, a combination of them worked for me!

    The most obvious is of course to replace the battery with a new and fresh one as well, to rule out that possability :)
  • Hi Nishant,

    The solution made by AlexTim below together with replacing battery and reflashing a few times solved the issue for me.