Skip to main content

DA14531 Heap Settings when sending BIG data

1 week ago

DA14531 Heap Settings when sending BIG data

Posted bywanhuaqifang35 points 1 reply
0 upvotes

嗨,对话框点。

I want use DA14531 to send lots of >500 bytes packets. But sometimes it will reset with a MEMORY_ALLOC_FAIL.

Which HEAP should I increase first?

ENV Heap or MSG Heap?

accepted answer!

1 week ago

PM_Dialog

Hi wanhuaqifang,

This is probably a platform_reset(). The most probable reason why you are getting this error is due to insufficient memory, because you are allocating messages which are never consumed. For example, if you are allocating notification messages and you have a small connection interval the messages are piled up until a connection event arrives, but with a large connection interval your run out of memory before the connection event arrives. You could increase the connection interval. Another reason for this might be that there is leakage pilling up after each connection, as the error code is RESET_MEM_ALLOC_FAIL. To do so, check if there are any pending messages and make sure that you are consuming the messages that you get when the message is handled or if you are allocating data they should be freed. To answer your question, please try to increase the MSG Heap – see below a nice tutorial :

http://lpccs-docs.dialog-semiconductor.com/Tutorial_SDK6/heap_usage.html

Thanks, PM_Dialog