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