Hi
I have DA14580 board with a sensor that samples at a rate of 25Hz. The data is send to a central device through notification at the same rate. The max connection interval is set to 40ms, and it works pretty well at first. However if the central is moved out of range, the board will soon be reset. I guess this is because the notifications could not be send out so they were queuing up and the messages could not be freed and the heap was exhausted, any ke_malloc() call thereafter would lead to a soft reset.
The question is how could the application know congestion is happening so that it stops pushing new data to the kernel?
Best Regards,
Bill
Device:
Hi gouzhuang,
Probably this is the reason of your reset. i suppose that you can prevent the data generation when you get a disconnection event.
Thanks MT_dialog
Hi Bill.
The key to fix congestion control is to wait for the GATTC_CMP_EVT after sending a notification event. After you've received this, you can send the next notification packet. That way you should never run out of heap memory.
Thanks Joacimwe, I think this is what I'm looking for.