Why the CyBle_GattsNotification some times takes so much time?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I use the oscilloscope to see the voltage on a 10R resistor, when I send data(16 bytes), there is a voltage drop for over 50~400 ms, why this takes so much time for sending notification data?

   

I use a cr2032 battery.

0 Likes
1 Solution
Anonymous
Not applicable

It seems the chip does not synchronize send data to the connection interval. For example, when the connection interval is 200mS, and I send notification when 50ms, then the chip will keep in high power consumption when it is in 50~200mS stage,Is this a chip bug?

View solution in original post

0 Likes
7 Replies
Anonymous
Not applicable

It seems the chip does not synchronize send data to the connection interval. For example, when the connection interval is 200mS, and I send notification when 50ms, then the chip will keep in high power consumption when it is in 50~200mS stage,Is this a chip bug?

0 Likes
Anonymous
Not applicable

So the problem is from the time I call CyBle_GattsNotification to the next connection interval time arrive(the notification will be sent), which state is the ble and the ble substate.Can I put the mcu to deepsleep at this time?

0 Likes
Anonymous
Not applicable

You can only put the CPU into deepsleep if the BLE chip successfully enters deep sleep when you call CyBle_EnterLPM(CYBLE_BLESS_DEEPSLEEP);

   

If you try to set the CPU into deepsleep when the BLE chip is not in deepsleep mode, then the unit will behave unpredictably/undesirably.

   

You can set the CPU into sleep mode if unable to get into deepsleep as well.

0 Likes
Anonymous
Not applicable

I mean can I synchronize the data notification when the connection arrival arive?

0 Likes
Anonymous
Not applicable

I think you are looking for the CYBLE_BLESS_STATE_EVENT_CLOSE state. It seems that this state is returned when the BLESS is about to send the next packet over the radio?

   

Here is the related documentation that makes me think it is what you are looking for:

   

/******************************************************************************
* Function Name: CyBle_GapUpdateAdvData
***************************************************************************//**

*  This function allows setting the ADV data and SCAN response data while advertising
*  is ongoing. Application shall preserve Bluetooth Spec 4.1 mandated AD flags fields
*  corresponding to the type of discovery mode the device is in and only change the
*  rest of the data. This API must be called when API CyBle_GetBleSsState() returns
*  CYBLE_BLESS_STATE_EVENT_CLOSE state. If API is called in any of the BLESS Low
*  Power Modes, it will force exit BLESS from Low Power Mode state to update ADV
*  Data. ........*/

0 Likes
Anonymous
Not applicable

Thanks for your reply, May be I need to use the CYBLE_BLESS_STATE_EVENT_ECO_STABLE to synchronize the notification.

0 Likes
Anonymous
Not applicable

I'm not sure what the ECO_STABLE event is for, but I would guess it has to do with the ECO clock being steady/fully-running.

   

The CLOSE event was shown in examples to be polled for when to change the advertisement data, which makes me think that it is set whenever the radio is about to resend or the radio is not currently transmitting.

   

I would play around with it a little and see if you can get one of those events to work for you.

0 Likes