PSOC 4 BLE Number of notifications sent | Cypress Semiconductor
PSOC 4 BLE Number of notifications sent
I have notice some strange behavior when trying to send some bursts of notifications over BLE. I will explain a little what I am doing. I compute some data after my device will be first connected to another client(dongle, smartphone app, etc). After the client disconnects my device I will continue to save data in RAM until the RAM is full, then transfer all the bytes from RAM to FLASH and so one, until both FLASH and RAM are full if no connection is done. Once a connection is establish and the notification of my characteristic is enabled by the client I intend to empty both FLASH and RAM by bursting a number of notification with size 17.(if Both flash and ram is full I have about 180 kB of data).
What I observed is that the BLE sends 10 such burst notifications and stops sending them even if the code still sends notifications.
My call: /* Notify the phone that the values are update */
This happens not only when I try to sent that 180kB but also if I only try 11 notifications.
So my questions:
Does PSOC 4 have the same Credit behavior like Nordic Chips, if someone worked with such thing? The credit behavior is like this: you have a number of bytes that can be sent and if you run out of credit you should put a while(delay, etc) until you will receive more or your data will not be sent.
Should I do other approach to overcome this problem?
I should mention that my code did not break even if the 180kB will introduce some Delay. The data from RAM, FLASH is correct and the code for sure calls the GattsNotification function for a lot of times. I have the same problem also in some status characteristics that should send 11 notifications once in a while. We developed another code for a Nordic nRF8001 chip with credit behavior and it sends even hundreds of notification without a problem. I have CY8C4248LQI-BL583 chip with 256 kB Flash/32 kB RAM.