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.

HAL_UART Increased power consumption CC2541

Other Parts Discussed in Thread: CC2541

I'm trying to minimize power consumption on my peripheral project. I am connecting the CC2541 to a chip via UART without flow control (slave chip only supports this). I am expecting average current draw to be around 20uA or less with an effective connection interval of 1.5s. I am seeing that when I enable the UART by setting HAL_UART=TRUE I am averaging about 70uA. When it is FALSE, I am averaging about 20uA.

Here are my preprocessor defines:

HAL_IMAGE_B

FEATURE_OAD

OAD_KEEP_NV_PAGES

INT_HEAP_LEN=2400

HALNODEBUG

OSAL_CBTIMER_NUM_TASKS=1

HAL_AES_DMA=TRUE

HAL_DMA=TRUE

POWER_SAVING

HAL_LCD=FALSE HAL_LED=TRUE

SERIAL_INTERFACE

HAL_UART=TRUE

HAL_KEY=TRUE

UUID_128_BIT

XOSC32K_INSTALLED=TRUE

Here's my IO setup:

P0SEL = 0x0C; // Configure Port 0 as Peripheral

P1SEL = 0; // Configure Port 1 as GPIO

P2SEL = 0; // Configure Port 2 as GPIO

P0DIR = 0xEB; // P0.1(IR Direct) is output, // all others (P0.2-P0.5) is for uart

P1DIR = 0xF7; // All port 1 pins (P1.0-P1.7) as output except P1.3(pair button)

P2DIR = 0x1F; // All port 2 pins (P2.0-P2.4) as output

P0 = 0x0C; //

P1 = 0x05; // Active Low LEDs

P2 = 0x00; // All pins on port 2 to low

Ive been fiddling around with GPIO configurations for a while without success. Are there any gotchas or anything someone knows about. Any tips or advice is welcome.

Thanks,

Erick

  • Hi Erick,

    Are you using TI reference HW (i.e. CC2651EM) or your own board / PCB? Also, if you disconnect UART, do you still see the higher current with HAL_UART=TRUE?

    Best wishes
  • Thanks for the quick response!
    I get the same result when I run it on the CC2541EM with only VDD and ground pins connected. Exactly the same power consumption.
  • I have tried things like setting up the UART pins as GPIO instead of peripheral pins. Nothing seems to work. There must be some configuration causing this that is run when the HAL_UART is set to true. I'm trying to narrow it down but with no luck.

  • Hello. If you are using UART with POWER_SAVINGS, this means the CTS / RTS signals will bring the device in / out of sleep. Are you performing this handshake correctly? Can you provide an oscilloscope capture of CTS, RTS, and power consumption?
  • Thanks for the reply Tim.
    CTS and RTS are not connected. The slave chip is only provides TX and RX pins so we cannot use flow control. We do know when we want to be able to talk so there should be no surprises there. Do you have recommendations for strategies for this type of setup?

  • CTS and RTS are really only being used as GPIO's in this driver. They don't actually affect the flow control. Can you add two GPIO signals to the slave chip to function as CTS / RTS? Again, this won't affect the UART flow control.
  • I have no control over the firmware on the slave chip so I cannot modify it.
    Basically, I was trying to do something like this…

    -Get a command to send to the slave chip via BLE.
    -Go into to PWRMGR_ALWAYS_ON power mode and send the command.
    -Return to PWRMGR_BATTERY.

    Is something like this possible while keeping power consumption low?
    I tried to set it up this way and when not sending commands, power consumption is 70uA instead of 20uA that I hoped for. (1.5s effective conn. interval)
  • Do you need to receive any UART data back from the slave chip?
  • I do, but I would only want to enter PWRMGR_BATTERY after response or timeout.
  • If UART communication is synchronous, i.e. you are always initiating UART communication from the CC254x and only expect to receive UART data from the slave after sending, then I suppose you don't need the CTS / RTS handshaking since the slave chip will never need to wake the CC254x.

    In order to remove the CTS / RTS handshaking in the driver, you need to define the following preprocessor definitions:
    1. DMA_PM=0
    2. NPI_UART_FC=FALSE

    You will also need to modify the UART driver to manually control sleep such that:
    1. Stay awake when you have UART data to send with: (void)osal_set_event(Hal_TaskID, HAL_PWRMGR_HOLD_EVENT);
    2. Allow sleep after receiving data from slave chip: (void)osal_set_event(Hal_TaskID, HAL_PWRMGR_CONSERVE_EVENT);

    I can't comment on average power numbers since it obviously depends on how much UART data you are transferring. Perhaps 70 uA is the expected current. I would recommend taking an oscilloscope capture of the TX / RX lines and power consumption to ensure that the device is sleeping as expected.
  • I can report that my idle consumption is now 20uA with a 1.5s conn. interval. All my UART communication functionality is still intact. It seems that one of the biggest missing pieces was the DMA_PM=0 definition.

    Thank you very much for your help Tim!
    -Erick