Other Parts Discussed in Thread: CC2650, SYSBIOS
Tool/software:
Hello,
I am using a CC2650MODA with Bluetooth Stack Version 2.2.8.12 and Simplelink SDK version 6.30.01.03. My application is based on the SimplePeripheral example.
The CC2650MODA is connected to another device via UART which sends a message once a second. It asynchronously receives messages sent by a connected BLE central (PC) and sends answers. The CC2650MODA is configured with two characteristics (one for read, one for write) with a length of 80 characters each.
The CC2650MODA copies the received UART messages into the send characteristic to be read by the BLE central (PC) via Bluetooth. After receiving a message by a connected PC, the CC2650MODA will write this message to the connected device using UART. It will answer to the message by sending specific answer message using the same UART port that is used for the regular 1 second messages. In this example I have not included the reading and answering process, to make the example as simple as possible.
The SBP_PERIODIC_EVT_PERIOD is set to 1000, so the SimpleBLEPeripheral_performPeriodicTask() will be executed once every second.
The SimpleBLEPeripheral_performPeriodicTask() looks like this:
SimpleBLEPeripheral_performPeriodicTask() { UARTCC26XX_read(my_Handle, &my_Buffer, 80); SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR4, SIMPLEPROFILE_CHAR4_LEN, my_Buffer); }
Very simple. The problem is:
My current consumption while connected via bluetooth starts with 1.40 mA and goes down to 0,7 mA over course of 2 hours. After that, it goes up to 1,7 mA at once and slowly decreases to 0,7 mA over time.
What I think that happens is: While the UARTCC26XX_read function is called and waiting for data to come, the UART peripheral is active and blocking the sleep mode. The slow downshift in current consumption can be explained with a timing difference between the connected device and the clock in the CC2650MODA. So the periods the sleepmode is being blocked becomes shorter and suddenly goes to a maximum of 1,7mA.
I have already tried to read the UART bytewise with the callback function, but that will leave the UART peripheral always activated, which means the sleepmode is permanently deactivated, so the current consumption is 1,7mA at all times.
I try to optimize the application for current consumption, so this issue is vital for my project.
Is there a way to stop the active UART peripheral from blocking the sleep mode? Or to optimize the timing to maximize the time in sleep mode?
Thank for your time and help.