- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear BCM,
When we develop and debug one central to several peripherals.
We have some information but confused us as below:
in : \WICED\WICED-Smart-SDK-2.1.1\WICED-Smart-SDK\Wiced-Smart\tier2\brcm\libraries\inc\thread_and_mem_mgmt.h
There is one function named cfa_mm_ConfigureMemoryPool()
The description above this function is:
////////////////////////////////////////////////////////////////////////////////////////////////////
/// Allows the application to configure the size and number of memory blocks in the general pool.
/// There are only 3 memory pools in the system, 0, 1 and 2. The following is the default
/// configuration of the pools:
/// pool[0].size = 32, pool[0].num = 28
/// pool[1].size = 64, pool[1].num = 6 + max_num_connections (= 4 by default)
/// pool[2].size = 264, pool[2].num = 3
/// If you want pool 2 to be 10 buffers with each being 272 bytes, then invoke it this way:
/// cfa_mm_ConfigureMemoryPool(CFA_MM_POOL_2, 272, 10);
/// Note that this can only be done only in the context of the APPLICATION_INIT function
/// (or the function that invokes bleapp_set_cfg). Calling this in any other context is undefined.
/// Making any of these pools larger than the defaults will reduce the amount of free RAM available
/// to the app. Use with caution.
/// If you are setting max number of connections using blecm_setmaxconnection(), make sure that this
/// function is invoked after setting max number of connections, or the behavior is undefined.
/// \param pool_id Pool ID of the pool being configured. Must be one of CFA_MM_POOL_X.
/// \param block_size Size of (in bytes) each buffer in this pool.
/// \param block_num Number of buffers to allocate in this pool.
/// \return TRUE on success, else failure.
////////////////////////////////////////////////////////////////////////////////////////////////////
/// If you are setting max number of connections using blecm_setmaxconnection(), make sure that this
/// function is invoked after setting max number of connections, or the behavior is undefined.
Question I: In our real test, with the current setting, BCM20736 could create as max as 4 connections at one time. if we want to create connections up to 8, how to configurate BCM20736 in APP layer?
Question II: We refer to the app of hello_client:
In hello_client_create();
{
......
//enable multi connection
blecm_ConMuxInit(HELLO_CLIENT_MAX_SLAVES); // Here we define HELLO_CLIENT_MAX_SLAVES 7
blecm_enableConMux();
blecm_enablescatternet(); // What does this function do ??
...
}
the function of blecm_setmaxconnection() and cfa_mm_ConfigureMemoryPool() is not called in app of hello_client, where are the two functions called ??
Question III: How to call the configuration functions in APP layter to let BCM20736 support 8 connections at one time ?
Many thanks...
Solved! Go to Solution.
- Labels:
-
MasterSlave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Max number of connections and cfa_mm_ConfigureMemoryPool() are loosely related, slight dependency of number of connections and number of pools because the connections uses a portion of the pools. If you are increasing maximum connections beyond the default, you should increase cfa_mm_configureMemoryPool accordingly.
-Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a good thread on this topic
How many connect several Max about 20737s?
Look out for Arvind's proposed fix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We will try this configuration. thanks Boont
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Boont,
What about the function of cfa_mm_ConfigureMemoryPool()
The description in this function mentioned that:
/// If you are setting max number of connections using blecm_setmaxconnection(), make sure that this
/// function is invoked after setting max number of connections, or the behavior is undefined.
If I only call blecm_setmaxconnection() in APPLICATION_INIT() but not call the function of cfa_mm_ConfigureMemoryPool(), could I suceed to create the right connections ??
Pls advise....
Many thanks...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Max number of connections and cfa_mm_ConfigureMemoryPool() are loosely related, slight dependency of number of connections and number of pools because the connections uses a portion of the pools. If you are increasing maximum connections beyond the default, you should increase cfa_mm_configureMemoryPool accordingly.
-Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Kevin,
Yes, we now know how to use the function of cfa_mm_ConfigureMemoryPool(). Many thanks...