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.

CC2564MODNEM: Bluetopia Queries

Part Number: CC2564MODNEM

Hello TI Support,

We are intending to use Bluetopia stack with MSP430 and CC2564MODNEM chip. This is a medical device and on our MSP430 chip we are using our own home grown Real Time Operating System /Kernel.

I have gone through Bluetopia System Call Requirments document and have following questions.

A. Timer Handling Functions.

1. What is the granularity of the Wait/Delay function in milliseconds? 

B. Scheduler Handling Functions.

2. While debugging we saw that Bluetopia is registering couple of functions that needs to be called periodically. Those functions are UpdateHCICallbackThread and UpdateTimerModule.

The UpdateTimerModule function has period of 50ms but UpdateHCICallbackTherad is 0, i.e.it is its running under super loop.

Is this the requirement? Can we call this function every 10ms or else what is the granularity. It would be great if you can let us know what this function is all about.

3. Apart from these 2 functions are there any more functions that Bluetopia will schedule?

C. Memory Handling Functions.

4. Can we allocate memory statically? 

5. Also what is the largest amount of buffer or memory we will need at given point of time?

6. What if the memory allocation fails? How will Bluetopia handle it internally?

Also can you share the link for Bluetopia System Call Requirement document for Threaded Application?

Request you to please provide as much information as possible for the above questions.

Thanks,

Justin John

  • For new designs, we recommend to use MSP432 or Cortex-M3/4 based hosts. We will get back on the above Blutopia stack queries.

    Thanks

  • Hi Hari,

    Thank you for looking into my ticket. Unfortunately its an old design and we are not planning to change the chips.

    Thanks,

    Justin

  • Hi Hari,

    Did you get chance to look into the above Bluetopia stack queries?

  • Hi justin,

    For BluetopiaSystem call requirements for RTOS, please refer to the documentation under 'FreeRTOS/Documentation'. You can download STM32 Bluetopia SDK for reference.

    All the BTPS defines are in 'Bluetopia/include/BTPSCFG.h'. It appears 'UpdateHCICallbackThread' is only for non-OS environments and gets called when 'BTPS_ExecuteScheduler' gets invoked.

    I did not get a chance to look at other Memory related queries. Will, get back in couple of days.

    Thanks

  • Hi Hari,

    Did you get chance to look into memory related queries and also the Timer Handling questions?

  • Sorry for the delay. Will get back in  a day or two..

  • Bluetopia stack memory allocations are all taken from the 20KB memory preallocated during initialization. It does not use C runtime memory allocations. Please, check the BTPSKRNL.c under 'Bluetopia/btpskrnl' folder. This memory is from the Data segment.

    /* Defines the maximum number of bytes that will be allocated by the */
    /* kernel abstraction module to support allocations. */
    /* * NOTE * This module declares a memory array of this size (in */
    /* bytes) that will be used by this module for memory */
    /* allocation. */
    #define BTPS_MEMORY_BUFFER_SIZE (20 * 1024)

    Thanks

  • Thanks Hari.

    Can You also please look into these queries?

    A. Timer Handling Functions.

    1. What is the granularity of the Wait/Delay function in milliseconds? 

    B. Scheduler Handling Functions.

    2. While debugging we saw that Bluetopia is registering couple of functions that needs to be called periodically. Those functions are UpdateHCICallbackThread and UpdateTimerModule.

    The UpdateTimerModule function has period of 50ms but UpdateHCICallbackTherad is 0, i.e.it is its running under super loop.

    Is this the requirement? Can we call this function every 10ms or else what is the granularity. It would be great if you can let us know what this function is all about.

    3. Apart from these 2 functions are there any more functions that Bluetopia will schedule?

  • Hi justin,

    We, will get back in few days, as we are busy with a release schedule.

    Thanks

  • Hi,

    1. The granularity of the wait/delay is the BTPS_TICK_COUNT_INTERVAL of BKRNLAPI.h. This is typically set to 1ms though you could change this if needed.

    2. The purpose of the UpdateHCICallbackThread is to Dispatch HCI Callbacks (HCI Event/ACL Data/SCO Data) to callbacks that have been registered with the Bluetooth Protocol Stack. That thread is set to have a period of BTPS_MINIMUM_SCHEDULER_RESOLUTION which effectively means it will keep executing repeatedly, which is what you want if you're trying to process a stream of events.However, that thread will block and wait infinitely if there are no messages to dispatch, so even though its period is set to 0ms, it will generally be in a blocked state. So it's best to keep this thread at the minimum granularity, to ensure application responsiveness to data packets and other HCI events from connected devices.

    3. Those are the only two functions that the Bluetopia stack will create for itself. You can use that same BTPS_AddFunctionToScheduler() to add your own application functions to the scheduler though, and indeed many of the provided demos do so.

    Let me know if you need more clarification on the info provided above or have further questions on the Bluetopia stack.

    Regards,

    Michael

  • Hi Michael,

    Thanks for looking into it and providing the details.

    I wish we could have got this answered little earlier as we have made decision to not use Bluetopia and have switched to another stack.

    Regards,

    Justin