缓冲区大小的需求方

Learn MoreFAQsTutorials

6 posts / 0 new
Last post
Lyadnov
Offline
Last seen:9 months 1 day ago
Joined:2019-07-31 13:57
缓冲区大小的需求方

Dear support team, i need know, how i may increase parameter TX_BUFFER_ITEM_COUNT in user_sps_sheduller.h (DSPS example). I need more size buffer, than example use (1800), but when i make this parameter about 4000, i have crash.

Device:
PM_Dialog
Offline
Last seen:2 hours 37 min ago
Staff
Joined:2018-02-08 11:03
Hi Lyadnov,

Hi Lyadnov,

Thanks for your question. Can you please indicate where the code gets crashed? Please run it debug mode. Also, what modifications you have done in the DSPS project? Only the TX_BUFFER_ITEM_COUNT size is changed?

Thanks, PM_Dialog

Lyadnov
Offline
Last seen:9 months 1 day ago
Joined:2019-07-31 13:57
Hi, i check DSPS project

Hi, i check DSPS project without any change, only TX_BUFFER_ITEM_COUNT and HIGH WATERMARK, see screen attach. I have error during debugger start, see screen1 attach.

Attachment:
PM_Dialog
Offline
Last seen:2 hours 37 min ago
Staff
Joined:2018-02-08 11:03
Hi Lyadnov,

Hi Lyadnov,

Many thanks for the attached screenshots and for debugging the firmware. Τhe platform_reset_func() is invoked by the platform_reset(), which is implemented in the ROM code. The most possible reason why you get this assertion 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. Probably, in when changing the TX_BUFFER_ITEM_COUNT there might be some kind of memory leakage pilling up after each connection, as the error code is RESET_MEM_ALLOC_FAIL. To do so, I would advice you 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. Let my share with you a simple example. If you sampling the ADC and you are allocating messages in order to send the data over notifications as soon as there is a connection the device eventually will run out of memory, and if the device runs out of memory this will cause the device to reset. To avoid the platform_reset_func, I would suggest you to increase the heap size by defining the DB_HEAP_SZ in the da1458x_config_advanced.h header file. Please let me know if this change figures your issue out.

Thanks, PM_Dialog

Lyadnov
Offline
Last seen:9 months 1 day ago
Joined:2019-07-31 13:57
Hi, really after increase DB

Hi, really after increase DB_HEAP_SZ, all work without crash. Thank you very much!

PM_Dialog
Offline
Last seen:2 hours 37 min ago
Staff
Joined:2018-02-08 11:03
Hi Lyadnov,

Hi Lyadnov,

Glad that you figured your issue out and thanks for accepting my answer. If you have any other issue, please create a new forum thread!

另外,我建议你take a look into our new Smartbond device.

//www.xmece.com/products/connectivity/bluetooth-low-energy/products/da14531

Thanks, PM_Dialog