Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
How to monitor free RAM and buffer usage in BTSDK applications
Embedded devices are generally memory constraint devices. When writing an application we should extremely careful in optimising the memory consumption. So, while building an application, it is important to monitor the available free memory in the device which we can use it for further feature development.
Let me introduce two useful APIs available in BTSDK platforms to monitor the memory usage.
Use wiced_memory_get_free_bytes() to get the number of free bytes of RAM left in your application. Please check wiced_memory.h for its documentation. Example usage and output are shown below.
There are four buffer pools available in BTSDK platforms and they are allocated by the stack using the configuration defined in wiced_bt_cfg_buf_pool_t. Use wiced_memory_get_free_bytes() to get dynamic buffer usage from the last start of the system. Please check wiced_memory.h for it's documentation. Example usage and output are shown below.