cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

Anonymous
Not applicable

Sometimes when I build the glucose profile code I see this trace statement

GPIO_WP:OFF=0

But then I dont see any other trace statements ...

It seems like the code isnt running properly for some reason.

What is the max RAM the app can be? I need to add some command parsing code to the application

0 Likes
1 Solution
ArvindS_76
Employee

If you think you are running out of RAM, try this:

extern UINT32 cfa_mm_MemFreeBytes(void);

void app_create(void)

{

    // All other app initialization.

    // Trace number of free bytes.

    ble_trace1("Free RAM (bytes): %d\n", cfa_mm_MemFreeBytes());

}

cfa_mm_MemFreeBytes() returns the number of bytes free at the point of invocation. Calling it at the end of the app_create function will ensure that you get the real number of free bytes after all the initialization is done. So your app code can grow by at most these number of bytes (but perhaps less too because some callback registrations, interrupt handler registrations also take up some dynamic memory, but this will give you a very good idea of how large your app can be).

View solution in original post

1 Reply
ArvindS_76
Employee

If you think you are running out of RAM, try this:

extern UINT32 cfa_mm_MemFreeBytes(void);

void app_create(void)

{

    // All other app initialization.

    // Trace number of free bytes.

    ble_trace1("Free RAM (bytes): %d\n", cfa_mm_MemFreeBytes());

}

cfa_mm_MemFreeBytes() returns the number of bytes free at the point of invocation. Calling it at the end of the app_create function will ensure that you get the real number of free bytes after all the initialization is done. So your app code can grow by at most these number of bytes (but perhaps less too because some callback registrations, interrupt handler registrations also take up some dynamic memory, but this will give you a very good idea of how large your app can be).

View solution in original post