This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc2540 simpleBLEcentral work flow and power management problem

Other Parts Discussed in Thread: CC2540

Hi,

  1. As far as i know, simpleBLEcentral could do scan device, write/read data to peripheral, read rssi. However these functions required user input. If i want all these things are being done by program. Could I simply call like read RSSI after the peripheral's services are found or i have to wait for a certain time to make sure the connection is stable enough to do read/write?

  2. If the CC2540 enter PM2 mode while connected with Phone, after 4 or 5 minutes the CC2540 wake up again. Do they need to pair up again?

Thanks

Danny

  • Hi Danny,

    Power management works like this; If the application doesn't have anything to process and no OSAL timers are set, it will go into PM3. Only way to wake it up is external interrupt so this power mode is not used during a BLE connection.

    PM2 however, is a power mode which is used as soon as nothing is to be processed, which means that between connection events (during communication), the device will go into PM2 sleep. This is how we are able to run on a coin cell. The connection events is where the communication occurs and this is where the RSSI is obtained during read/write operations. The read/write operation can be set from the Application at any time but it will be executed during the next connection event.

    In our current BLE stack (v1.4) we have a bug that does not update RSSI on empty connection events. Empty connection event means that only acknowledgements where sent to maintain the link but no "data" was transmitted.

    That being said.

    1) You can issue read/write as soon as the connection is established

    2) If POWER_SAVING is defined, the device will go into PM2 "all the time" without affecting the performance as it's only doing so when nothing is to be processed. I think you are referring to PM3 which would require re-connection but not necessarily re-pairing if bonding option was set as all pairing data (LTKs etc.) was then stored in flash.

    I hope I cleared things up a bit.

    Best Regards

    Joakim