platform_reset_sdk in case of central disconnect during intense communication

Learn MoreFAQsTutorials

4 posts / 0 new
Last post
VargaAdam
Offline
Last seen:2 months 1 week ago
Joined:2019-12-31 16:19
platform_reset_sdk in case of central disconnect during intense communication

Hello,

can you please help me with some clue in the following problem:

I have a central and a peripheral communicating through l2cap. The peripheral is sending data to the central. If the intensity of the communication is above a certain threshold and the central is reset, the peripheral will get stuck in platform reset sdk with reason RESET_MEM_ALLOC_FAIL. I attach the debug window screenshot. I have spare heap, no memory leak.

I use 2M phy with 251 DLE, connection interval min: 6, interval max: 10, slave lat: 1

As I increase the communication bandwidth this can happen without central disconnect also. If I lower the bandwidth the problem disappears. The threshold where I get this problem is around 200kbit/s. I use the 10.0.8.105 sdk.

Regards,

Adam

Attachment:
Device:
PM_Dialog
Offline
Last seen:17 min 2 sec ago
Staff
Joined:2018-02-08 11:03
Hi VargaAdam,

Hi VargaAdam,

平台复位的根源是堆栈runs out of heap memory. Are you sending data only after getting a confirmation that the previous data is sent? You should get a BLE_EVT_GATTC_WRITE_COMPLETED once the write attribute value completed . Would it be possible to provide a sniffer log in order to check out the messages over the air?

Thanks, PM_Dialog

VargaAdam
Offline
Last seen:2 months 1 week ago
Joined:2019-12-31 16:19
Hello,

Hello,

I'm using L2CAP communication, not gatt. But no, I'm not waiting for confirmation, based on the error message I thought that someone runs out of memory. The question is, has the bluetooth a separate stack and heap? Because meanwhile I found that increasing dg_configBLE_STACK_DB_HEAP_SIZE can help. The BLE stack buffers my sent messages until is realizes that the connection is lost? Can you describe me this macro?

Regards,

PM_Dialog
Offline
Last seen:17 min 2 sec ago
Staff
Joined:2018-02-08 11:03
Hi VargaAdam,

Hi VargaAdam,

The dg_configBLE_STACK_DB_HEAP_SIZE macro defines the BLE host's attribute database heap size. As mentioned before, the most probable reason for platform reset is that the stack runs out of heap memory.

Thanks, PM_Dialog