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.

RTOS: CC2640R2F

Other Parts Discussed in Thread: LAUNCHXL-CC2640R2, CC2640R2F, CC2650

Tool/software: TI-RTOS

Hi TI experts,

I found an interesting Current Spike issue on LAUNCHXL-CC2640R2, and below is the steps to reproduce it on LAUNCHXL-CC2640R2.

1. Import the project simple_peripheral_cc2640r2lp_oad_offchip_app to CCS with bim and stack from the latest SDK cc2640r2_sdk_1_50_00_58

2. Apply the diff (add external page erase every 5 min) to simple_peripheral_oad_offchip.c

3. Build and load it to LAUNCHXL-CC2640R2 with a multiple-meter to measure the Current and Voltage

4. After a few hours, I got the Current and Voltage results as showing in the attached picture.

My question is how I can solve the Current Spike issue? Since it will damage the battery and cause cc264or2f reset.

Current spike screenshot,

the diff file added to run external flash page erase every 5 minutes.

diff --git a/simple_peripheral_oad_offchip.c b/simple_peripheral_oad_offchip.c
index de123d0..5cc6a2d 100644
--- a/simple_peripheral_oad_offchip.c
+++ b/simple_peripheral_oad_offchip.c
@@ -651,6 +651,24 @@ static void SimpleBLEPeripheral_init(void)
   }
 }
 
+
+#include "flash_interface.h"
+static uint32_t global_timer = 0;
+static uint32_t current_page = 0;
+void current_spike_page_erase(void)
+{
+    if( global_timer % 60 == 0 )
+    {
+        if ( flash_open() )
+        {
+            current_page = current_page % 256;
+            eraseFlash(current_page);
+            current_page ++;
+        }
+    }
+    global_timer ++;
+}
+
 /*********************************************************************
  * @fn      SimpleBLEPeripheral_taskFxn
  *
@@ -797,6 +815,7 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1)
       if (events & SBP_PERIODIC_EVT)
       {
         Util_startClock(&periodicClock);
+        current_spike_page_erase();
 
         // Perform periodic application task
         SimpleBLEPeripheral_performPeriodicTask();
@@ -1265,7 +1284,7 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
       break;
 
     case GAPROLE_WAITING:
-      Util_stopClock(&periodicClock);
+//      Util_stopClock(&periodicClock);
       SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
 
       Display_print0(dispHandle, SBP_ROW_CONN_STATUS, 0, "Disconnected");

I know there is a power consumption bible available at  but it doesn't help to resolve the current spike issue.

Thank you,

David

 

  • Hi David,

    I assume you are running off a battery? If yes, what type and how is it connected to the LaunchPad? What resistor value are you using for the measurements?

    The voltage drop only seems to be slightly above 50 mV which should not be too concerning.

    Cheers,
    Fredrik
  • Hi Fredrik,

    First of all, thank you very much for taking care this issue, really appreciate your help.

    Second of all, Yes, you are absolutely right, I am using an external battery for this testing. Please see the attached Launchpad cc2640r2f setup.

    But I am not sure if I understand your 2nd question about the resistor value correctly, I didn't measure the resistor value of Launchpad CC2640r2f (I assume TI guys all know about that, and you can also get it from Voltage/Current). I simply apply a mooshimeter (found it at "https://moosh.i" ) to Launchpad cc2640r2f board, and the sampling rate is set to 1 sample/second.

    In order to reduce your guys' effort for reproducing this issue on TI Launchpad cc2640r2f, the bim and stack+app merged files are attached. 

    Archive.zip

    If you need any further information, please let me know. 

    Again, thanks for your effort for helping to resolve this issue.

    Thank you,

    David

  • Hi Fredrik,
    Do you have update about the current spike issue happened on Launchpad cc2640r2f? or any workaround soltions?
    If you need more information please let me know.

    Thank you,
  • Hi David,

    I do not know what is causing this. Do you see the same if you run off another power source?
  • Hi Fredrik,

    The other power source is NOT an option for us. Since I have posted the procedure about how to reproduce it on LaunchPad cc2460r2f, can you escalate this issue to someone in TI technical team who is responsible for this kind of issue?

    Thank you for help

  • Hi David,

    Using another power source was meant to be a debugging step on your end not the ultimate solution. It would also be good if you could verify whether the current spike is coming from the CC2640R2F or the flash part.

    Cheers,
    Fredrik
  • Hi david,

    I have recently done a CC2640R2F based product which is powered by coin cell battery. We worry that the device operation including SPI External Flash write/read will cause a device reset. Device Reset only happened repeatedly when the coin cell battery is really low.

    Seems the spike is caused by SPI External Flash Operation. I suggest to shutdown the SPI External Flash when not in use.

    -kel
  • Hi Fredrik,
    Thanks for keep following up this current spike issue. I will do the USB power supply measurement even it is not an option for our Customers, in the meantime could you please tell me how I can exactly verify whether current spike is coming from the CC2640R2F or the flash part on TI launchpad cc2640r2f?

    Thank you,
    David
  • Hi Fredrik,

    I did run the test using the same binary files on LaunchPad cc2640r2f with USB interface as the power supply, and the current spike does show up in the test results (please see attached picture for details). Regarding whether the current spike is coming from cc2640r2f or flash part, I suspect the current spike may come from among TI-RTOS, Drivers and CC2640R2F. The reason is that I don't see the current spike on CC2650 Sensortag when running the same test (I think the external flash chip used on latest version Sensortag cc2650 is the same one used on LaunchPad cc2640r2f).

    Please help to escalate this issue to your technical team.

    Thanks,

    David

  • Hi David,

    I have done extensive current measurement test using the SDK v1.40 simple peripheral off-chip oad example program and CC2640R2F Launchpad. I found that the SPI External Flash consumes current even if you are not reading or writing to it. The solution is to shutdown the SPI External Flash at initialization. Turn on the SPI External Flash when you are going to use it and then shutdown when not using it.

    The problem is the SPI External Flash shutdown code is not included at SDK v1.40 simple peripheral off-chip oad example program. So you need to copy the code from PIN shutdown example program.

    -kel