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.

HostTestRelease with POWER_SAVING idle power 3.9mA?

Other Parts Discussed in Thread: CC2541, CC2540

I'm running HostTestRelease in SPI mode (configuration CC2541SPI) with the following defines:

INT_HEAP_LEN=2700
HALNODEBUG
OSAL_CBTIMER_NUM_TASKS=1
POWER_SAVING
HAL_AES_DMA=TRUE
HAL_DMA=TRUE
HAL_UART=TRUE
HAL_UART_DMA=0
HAL_UART_ISR=0
HAL_UART_SPI=2
HAL_SPI_QUEUED_TX=TRUE
HAL_KEY=FALSE
HAL_LCD=FALSE
HAL_LED=FALSE
GATT_DB_OFF_CHIP=TRUE

The CC2541EMK is socketed in a SOCBB, connected via port 1 SPI, and via the ground/3V3 pins to the ground/3V pins on a MCU development board.  In series on the 3V I placed a 10 ohm resistor and I'm measuring a 39.2mV drop across it right after power on (but also after sending UTIL_Reset or GAP_DeviceInit).

Reading through the HostTestRelease code, it would seem that after reset the CC2541 should have no timers running, and should be in HAL_SLEEP_DEEP                      (CC2540_PM3) which according to the datasheet should sip microamps, not milliamps.

Is there any configuration that I'm missing?

  • By adding

      P0SEL = 0; // Configure Port 0 as GPIO
      P1SEL = 0; // Configure Port 1 as GPIO
      P2SEL = 0; // Configure Port 2 as GPIO

      P0DIR = 0xFF; // All port 0 pins (P0.0-P0.7) as output
      P1DIR = 0xFF; // All port 1 pins (P1.0-P1.7) as output
      P2DIR = 0x1F; // All port 1 pins (P2.0-P2.4) as output

      P0 = 0xff;   // All pins on port 0 to high
      P1 = 0xff;   // All pins on port 1 to high
      P2 = 0xff;   // All pins on port 2 to high

    to "main", between HAL_BOARD_INIT() and HalDriverInit(), I was able to lower the current to 2.66mA.  I guess I need to figure out how to dynamically turn the SPI and DMA off and on.  Does the BLE stack supports dynamically "closing" the port then reopening it? Who calls NPI_InitTransport?

    [Actually, that is not quite true: if I power on the MCU board which in turns powers on the CC2541, I get a 10.54mA current.  If I then start debugging the HostTestRelease then quit the debugger, the idle current is 2.66mA.]

  • Adding:
      // Enable clock divide on halt
      // This reduces active current while radio is active and CC254x MCU
      // is halted
      HCI_EXT_ClkDivOnHaltCmd( HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT );

    to 'main', makes the current 17.1mA at idle (I presume it doesn't get to PM[23])