Part Number: CC2640R2F
Tool/software: Code Composer Studio
Hello,
I use Sable-X-R2 (LAIRD model based on cc2640r2f).
I am using the simple periphjeral program,made UART program,advertise the data to the mobile.
It is customized board.
The data is advertised,but the current consumption is 3 mA.
So I use Power_shutdown(Board_UART_RX,1000) in task function,in periodic part.
With this also I edit some part such as :
IN LOCAL VARIABLE :
static PIN_Config SPPBLEAppPinTable1[] =
{
Board_UART_RX | PIN_GPIO_OUTPUT_DIS | PIN_INPUT_EN | PIN_PULLUP | PINCC26XX_WAKEUP_POSEDGE | PINCC26XX_WAKEUP_NEGEDGE, //wakeup or after shutdown periodic
PIN_TERMINATE
};
IN LOCAL FUNCTION BEFORE SimpleBLEPeripheral_init() function =
void SPPBLEPeripheral_current1() ////after shutdown ,restart
{
hGpioPin1 = PIN_open(&pinGpioState1, BoardGpioInitTable);
PINCC26XX_setWakeup(SPPBLEAppPinTable1);
}
void SPPBLEPeripheral_deepsleep()
{
if(PIN_getInputValue(Board_UART_RX))
{
SDITask_createTask();
Task_sleep(5000);
}
}
And use it in SimpleBLEPeripheral_init()
static void SimpleBLEPeripheral_init(void)
{
// ******************************************************************
// N0 STACK API CALLS CAN OCCUR BEFORE THIS CALL TO ICall_registerApp
// ******************************************************************
// Register the current thread as an ICall dispatcher application
// so that the application can send and receive messages.
ICall_registerApp(&selfEntity, &syncEvent);
SPPBLEPeripheral_current();
SPPBLEPeripheral_deepsleep();
SPPBLEPeripheral_current1(); ..................................................
IN task functio I use :
if (events & SBP_PERIODIC_EVT)
{
/* ONE TIME ADVERTISE & SLEEP MODE */
SDI_closeTask(); ////reset to 15 uA
// Util_stopClock(&periodicClock); ////reset to 15 uA
// Util_dequeueMsg(appMsgQueue); //// reset to 15 uA
Power_shutdown(Board_UART_RX,1000); //// reset to 15 uA ,periodic is 1000
SPPBLEPeripheral_current1(); ////after shut down,periodic
}
My problem in it is working,
I used the advertising period for 5000 msec,
Then it go for shut doen for some time (i think 10msec).
Again it restarts,like thge period works.
But I try to change the shutdown time & it it not working ?
Can you please tell me ,how to change the shutdown time ?
what ever value I put in Power_shutdown() , the shutdown time is same.
It is not changing.
Pease help me.
# I have also changed the following :
DEFAULT_DESIRED_MAX_CONN_INTERVAL 160 ,
DEFAULT_DESIRED_MIN_CONN_INTERVAL 80,
DEFAULT_DESIRED_CONN_TIMEOUT 1000,
DEFAULT_CONN_PAUSE_PERIPHERAL 6 .....
But there is no change.
PLEASE HELP ME..........................?