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 connection time interval

Other Parts Discussed in Thread: CC2540, CC2650

Hi,

I have questions for CC2540 MAX/MIN connection time intervals. My understanding is that I can set them up using GAPROLE_MIN_CONN_INTERVAL // GAPROLE_MAX_CONN_INTERVAL. But I have no idea how the interval time is actually chosen between MIN/MAX intervals. I tried to find it in user guide and software's guide documents but couldn't find any clue.

I'm trying to make beacon like device with file transfer feature. So I'd like to set GAPROLE_MIN_CONN_INTERVAL to 80 (which is 100ms) for file transfer and GAPROLE_MAX_CONN_INTERVAL to 1600 (which is 2 sec) for beacon like mode. For this setting, I have below questions. Please help me to solve this problem.

1. How does it determine to use specific value between MIN and MAX connection intervals? Does it totally depend on Master side?

2. Is there a way to change connection interval on the fly?

3. Is it possible to control the slave latency on master side? From my understanding, by setting the slave latency, CC2540 (peripheral) can skip some connections based on data transfer status. Is there a way to decide whether it should skip connection or not initiated by Master? For example, with no data transfer CC2540 skips some connections to save power. When master wants to send data, CC2540 doesn't skip any interval until transfer is done. Is this possible scenario?

4. This is a bit out of topic, but I'm wondering if it's okay to change discoverable mode while it's in connection. If I do the GAPRole_SetParameter for GAPROLE_ADVER_DATA with changing only GAP_ADTYPE_FLAGS_GENERAL from GEP_ADTYPE_FLAGS_LIMITED in advertData, will it do the magic?

Thanks,

Brian

  • Hello Brian. First let me give a brief summary of connection intervals (for the BT 4.0 spec which is used for the 1.4.0 stack) Upon connection establishment, the master has all the say: it sets the connection parameters (min int, max in, slave latency, timeout) and the peripheral can either accept the connection or not. Once a connection is established, each side is capable of requesting parameter updates...although technically the slave has to request a parameter update and the master will actually send it.

    So to answer your questions...
    1. This depends on the stack being used. The TI stack will simply use the maximum connection interval.
    2. Yes, using the connection parameter update procedure as described above. These are abstracted to the GAPRole layer (periheral.c or central.c depending on the role of your device). For example, as a peripheral you can set the GAPROLE_PARAM_UPDATE_REQ paramter of the GAPPeripheralRole to true. As a central device, you can use the GAPCentralRole_UpdateLink. Note that these profiles are explained in detail in the CC2650 software developer's guide (www.ti.com/.../getliterature.tsp;fileType=pdf). I realize you're using a cc540 but the functionality at the GAPRole layer should be the same.
    3. The only way to do this is to update the connection parameters (which include slave latency) from the master side. However, as stated by the spec, this is not an instantaneous process. There are several connection events that must occur before the parameters are actually changed. Therefore, I don't think this will work in your scenario. One possibility is to reverse the roles of your devices. Instead of sending data from the master you can send data from the slave. This will cause to slave to wake up whenever it has data to send (regardless of slave latency).
    4. Yes, this should work.