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.

Bluetopia stack and BTPS kernel

Hi, TI

I have a question about the tasks that are performed in the stack every systick count. The problem consists in the following:

I worked on the power consumption of our device and I have noticed that even if I disable all Bluetooth transmissions(LE Advertising, Connectible and Pairable mode in BD/EDR), but initialize stack our device battery current increase by 450 uA. This is due to the fact that the controller active time (not in LPM3) was increased from 10 us(our different process) to 65 us. The SPPDemo project turns off the systick timer on stack idle, but I want use BTPS kernel for our RTOS and, therefore, the BTPS kernel is active every systick count. Thus, I have a question: What is the stack do every systick count, when all transmission are disabled? Can It be optimized or disable?

I have a question about the tasks that are performed on the stack timertransmission

  • Hi,

    I will check and get back to you.

    Regards,
    Gigi Joseph
  • Anton,

    In the MSP430 SDK there are 3 functions added to the BTPS scheduler: 1) the IdleFunction in Main.c, 2) a function to check for and process received data, and 3) a function to process timers if any. The only thing you can really control is the IdleFunction. You could remove it from the scheduler if you don't need it, sounds like you might though based on what you are saying.

    There are a few options that might help:

    1) Increase your systick interval so that the system wakes up less, so that the extra time spent in Bluetopia functions is negligible to the power consumption.

    2) Use your own scheduler system and don't run the BTPS scheduler when the Bluetooth stack is idle.

    Thanks,
    Samuel

  • Thank you for the answer,
    I suppose to use 2), that`s why I have another question: How can I know that the stack isn`t in the IdleState once I have turned off the scheduler? By the CTS interrupt, isn`t right?
  • Anton,

    You can't use CTS alone, it is also a hardware flow control pin and can be toggled on and off when Bluetooth data is being sent and received. Instead, in Main.c in IdleFunction() you can see how the app checks to see if the Bluetooth stack is idle:

    "if((BSC_QueryStackIdle(BluetoothStackID)) && (SleepEnabled))"

    This checks to see if there are any outstanding connection requests or if any timers are running, and also if the CC256x is idle (SleepEnabled).

    The MSP430 is awoken from LPM3 when the CC256x has activity and it transitions CTS.

    Thanks,
    Samuel