SWCU192 November   2021 CC1312R7 , CC1352P7 , CC2652P7 , CC2652R7

 

  1.   1
    1.     2
    2.     3
    3.     4
    4.     5
    5.     6
  2.   7
    1.     8
    2.     9
    3.     10
      1.      11
        1.       12
        2.       13
        3.       14
        4.       15
      2.      16
        1.       17
        2.       18
        3.       19
      3.      20
      4.      21
      5.      22
        1.       23
        2.       24
      6.      25
      7.      26
      8.      27
        1.       28
        2.       29
        3.       30
        4.       31
      9.      32
      10.      33
      11.      34
      12.      35
      13.      36
        1.       37
          1.        38
          2.        39
          3.        40
          4.        41
        2.       42
  3.   43
    1.     44
    2.     45
    3.     46
      1.      47
      2.      48
      3.      49
      4.      50
      5.      51
      6.      52
    4.     53
      1.      54
      2.      55
      3.      56
      4.      57
    5.     58
      1.      59
      2.      60
        1.       61
        2.       62
        3.       63
        4.       64
        5.       65
        6.       66
        7.       67
        8.       68
        9.       69
        10.       70
        11.       71
        12.       72
        13.       73
        14.       74
        15.       75
        16.       76
        17.       77
        18.       78
        19.       79
        20.       80
        21.       81
    6.     82
      1.      83
      2.      84
      3.      85
    7.     86
      1.      87
      2.      88
        1.       89
        2.       90
          1.        91
          2.        92
          3.        93
        3.       94
        4.       95
        5.       96
        6.       97
          1.        98
          2.        99
          3.        100
        7.       101
      3.      102
        1.       103
          1.        104
    8.     105
      1.      106
      2.      107
      3.      108
    9.     109
      1.      110
      2.      111
      3.      112
      4.      113
      5.      114
  4.   115
    1.     116
  5.   117
    1.     118
    2.     119
      1.      120
      2.      121
        1.       122
        2.       123
      3.      124
      4.      125
      5.      126
      6.      127
      7.      128
  6.   129
    1.     130
      1.      131
      2.      132
      3.      133
      4.      134
      5.      135
      6.      136
      7.      137
        1.       138
        2.       139
    2.     140
      1.      141
      2.      142
      3.      143
      4.      144
    3.     145
      1.      146
      2.      147
        1.       148
    4.     149
      1.      150
      2.      151
        1.       152
        2.       153
        3.       154
    5.     155
      1.      156
      2.      157
        1.       158
        2.       159
        3.       160
    6.     161
    7.     162
      1.      163
      2.      164
  7.   165
    1.     166
    2.     167
      1.      168
        1.       169
      2.      170
        1.       171
        2.       172
        3.       173
    3.     174
      1.      175
        1.       176
        2.       177
      2.      178
        1.       179
        2.       180
        3.       181
        4.       182
        5.       183
        6.       184
        7.       185
        8.       186
      3.      187
      4.      188
        1.       189
          1.        190
          2.        191
          3.        192
        2.       193
          1.        194
        3.       195
          1.        196
    4.     197
    5.     198
    6.     199
    7.     200
    8.     201
    9.     202
    10.     203
  8.   204
    1.     205
    2.     206
    3.     207
      1.      208
    4.     209
      1.      210
        1.       211
      2.      212
        1.       213
    5.     214
      1.      215
        1.       216
      2.      217
        1.       218
        2.       219
        3.       220
      3.      221
    6.     222
      1.      223
      2.      224
      3.      225
      4.      226
      5.      227
    7.     228
      1.      229
        1.       230
        2.       231
        3.       232
      2.      233
      3.      234
    8.     235
      1.      236
      2.      237
      3.      238
  9.   239
    1.     240
    2.     241
      1.      242
        1.       243
        2.       244
        3.       245
      2.      246
      3.      247
      4.      248
    3.     249
      1.      250
      2.      251
        1.       252
        2.       253
        3.       254
    4.     255
    5.     256
      1.      257
      2.      258
      3.      259
      4.      260
    6.     261
    7.     262
      1.      263
      2.      264
  10.   265
    1.     266
    2.     267
    3.     268
    4.     269
    5.     270
    6.     271
    7.     272
      1.      273
      2.      274
  11.   275
    1.     276
      1.      277
      2.      278
    2.     279
      1.      280
        1.       281
      2.      282
        1.       283
          1.        284
        2.       285
      3.      286
        1.       287
        2.       288
        3.       289
        4.       290
        5.       291
        6.       292
        7.       293
        8.       294
        9.       295
        10.       296
        11.       297
        12.       298
        13.       299
  12.   300
    1.     301
    2.     302
      1.      303
    3.     304
    4.     305
      1.      306
  13.   307
    1.     308
    2.     309
      1.      310
      2.      311
    3.     312
    4.     313
      1.      314
      2.      315
      3.      316
    5.     317
      1.      318
      2.      319
      3.      320
        1.       321
        2.       322
      4.      323
        1.       324
          1.        325
        2.       326
          1.        327
        3.       328
      5.      329
        1.       330
        2.       331
        3.       332
        4.       333
        5.       334
      6.      335
        1.       336
        2.       337
        3.       338
        4.       339
        5.       340
    6.     341
      1.      342
      2.      343
    7.     344
      1.      345
      2.      346
        1.       347
        2.       348
        3.       349
      3.      350
        1.       351
        2.       352
          1.        353
          2.        354
          3.        355
        3.       356
          1.        357
        4.       358
          1.        359
          2.        360
      4.      361
        1.       362
        2.       363
          1.        364
        3.       365
          1.        366
          2.        367
          3.        368
          4.        369
        4.       370
          1.        371
        5.       372
          1.        373
        6.       374
          1.        375
      5.      376
        1.       377
        2.       378
        3.       379
          1.        380
          2.        381
            1.         382
          3.        383
            1.         384
            2.         385
              1.          386
              2.          387
              3.          388
              4.          389
              5.          390
              6.          391
              7.          392
              8.          393
            3.         394
            4.         395
            5.         396
    8.     397
      1.      398
        1.       399
        2.       400
      2.      401
    9.     402
      1.      403
  14.   404
    1.     405
    2.     406
    3.     407
      1.      408
      2.      409
      3.      410
      4.      411
    4.     412
      1.      413
    5.     414
    6.     415
    7.     416
    8.     417
    9.     418
      1.      419
        1.       420
        2.       421
    10.     422
      1.      423
      2.      424
      3.      425
  15.   426
    1.     427
    2.     428
    3.     429
      1.      430
      2.      431
      3.      432
      4.      433
        1.       434
        2.       435
      5.      436
      6.      437
        1.       438
        2.       439
        3.       440
        4.       441
        5.       442
        6.       443
      7.      444
      8.      445
      9.      446
      10.      447
    4.     448
      1.      449
      2.      450
        1.       451
        2.       452
        3.       453
    5.     454
      1.      455
  16.   456
    1.     457
    2.     458
    3.     459
      1.      460
      2.      461
        1.       462
        2.       463
        3.       464
        4.       465
        5.       466
      3.      467
      4.      468
    4.     469
      1.      470
      2.      471
      3.      472
      4.      473
      5.      474
    5.     475
      1.      476
  17.   477
    1.     478
    2.     479
      1.      480
      2.      481
      3.      482
        1.       483
      4.      484
    3.     485
      1.      486
      2.      487
      3.      488
    4.     489
      1.      490
  18.   491
    1.     492
    2.     493
    3.     494
    4.     495
      1.      496
  19.   497
    1.     498
    2.     499
    3.     500
    4.     501
    5.     502
      1.      503
      2.      504
      3.      505
    6.     506
      1.      507
        1.       508
        2.       509
        3.       510
          1.        511
          2.        512
    7.     513
      1.      514
  20.   515
    1.     516
      1.      517
    2.     518
      1.      519
        1.       520
      2.      521
        1.       522
        2.       523
      3.      524
      4.      525
    3.     526
      1.      527
        1.       528
        2.       529
        3.       530
        4.       531
      2.      532
        1.       533
          1.        534
        2.       535
          1.        536
          2.        537
        3.       538
          1.        539
        4.       540
          1.        541
          2.        542
          3.        543
        5.       544
        6.       545
        7.       546
        8.       547
        9.       548
        10.       549
    4.     550
      1.      551
        1.       552
      2.      553
        1.       554
        2.       555
          1.        556
          2.        557
          3.        558
          4.        559
          5.        560
      3.      561
        1.       562
        2.       563
        3.       564
      4.      565
        1.       566
        2.       567
          1.        568
          2.        569
          3.        570
      5.      571
        1.       572
        2.       573
          1.        574
          2.        575
          3.        576
          4.        577
            1.         578
            2.         579
          5.        580
          6.        581
        3.       582
          1.        583
          2.        584
          3.        585
            1.         586
            2.         587
            3.         588
            4.         589
          4.        590
      6.      591
        1.       592
        2.       593
      7.      594
        1.       595
        2.       596
          1.        597
          2.        598
          3.        599
          4.        600
          5.        601
            1.         602
              1.          603
            2.         604
              1.          605
            3.         606
              1.          607
          6.        608
    5.     609
      1.      610
        1.       611
        2.       612
      2.      613
        1.       614
        2.       615
          1.        616
          2.        617
          3.        618
          4.        619
          5.        620
          6.        621
          7.        622
          8.        623
      3.      624
        1.       625
        2.       626
          1.        627
          2.        628
          3.        629
          4.        630
      4.      631
        1.       632
        2.       633
          1.        634
          2.        635
          3.        636
            1.         637
            2.         638
      5.      639
        1.       640
        2.       641
          1.        642
          2.        643
          3.        644
            1.         645
            2.         646
            3.         647
          4.        648
            1.         649
            2.         650
            3.         651
            4.         652
          5.        653
          6.        654
      6.      655
        1.       656
        2.       657
          1.        658
          2.        659
          3.        660
          4.        661
          5.        662
    6.     663
      1.      664
        1.       665
        2.       666
          1.        667
            1.         668
            2.         669
      2.      670
      3.      671
      4.      672
      5.      673
      6.      674
      7.      675
    7.     676
    8.     677
      1.      678
      2.      679
      3.      680
      4.      681
      5.      682
      6.      683
      7.      684
      8.      685
      9.      686
      10.      687
      11.      688
      12.      689
  21.   690
    1.     691
    2.     692
    3.     693
      1.      694
  22.   695
    1.     696
    2.     697
    3.     698
    4.     699
      1.      700
      2.      701
      3.      702
      4.      703
        1.       704
        2.       705
          1.        706
          2.        707
      5.      708
      6.      709
      7.      710
    5.     711
    6.     712
    7.     713
      1.      714
  23.   715
    1.     716
    2.     717
    3.     718
    4.     719
      1.      720
      2.      721
        1.       722
        2.       723
      3.      724
      4.      725
        1.       726
        2.       727
          1.        728
          2.        729
        3.       730
        4.       731
        5.       732
        6.       733
        7.       734
    5.     735
    6.     736
    7.     737
      1.      738
  24.   739
    1.     740
    2.     741
    3.     742
      1.      743
        1.       744
        2.       745
        3.       746
        4.       747
        5.       748
      2.      749
        1.       750
      3.      751
        1.       752
        2.       753
      4.      754
      5.      755
        1.       756
        2.       757
    4.     758
    5.     759
      1.      760
  25.   761
    1.     762
    2.     763
    3.     764
    4.     765
      1.      766
        1.       767
      2.      768
      3.      769
      4.      770
        1.       771
      5.      772
        1.       773
      6.      774
        1.       775
      7.      776
        1.       777
      8.      778
        1.       779
        2.       780
    5.     781
      1.      782
      2.      783
      3.      784
      4.      785
        1.       786
        2.       787
        3.       788
    6.     789
      1.      790
      2.      791
      3.      792
      4.      793
    7.     794
    8.     795
      1.      796
      2.      797
    9.     798
      1.      799
  26.   800
    1.     801
      1.      802
    2.     803
      1.      804
      2.      805
      3.      806
        1.       807
        2.       808
        3.       809
      4.      810
        1.       811
        2.       812
        3.       813
    3.     814
      1.      815
      2.      816
        1.       817
        2.       818
        3.       819
        4.       820
        5.       821
          1.        822
          2.        823
          3.        824
        6.       825
          1.        826
        7.       827
          1.        828
          2.        829
          3.        830
          4.        831
        8.       832
      3.      833
        1.       834
          1.        835
          2.        836
          3.        837
          4.        838
          5.        839
          6.        840
          7.        841
          8.        842
          9.        843
          10.        844
          11.        845
          12.        846
          13.        847
          14.        848
        2.       849
          1.        850
          2.        851
          3.        852
          4.        853
          5.        854
          6.        855
          7.        856
          8.        857
          9.        858
          10.        859
          11.        860
          12.        861
          13.        862
          14.        863
          15.        864
          16.        865
          17.        866
          18.        867
          19.        868
          20.        869
      4.      870
        1.       871
        2.       872
        3.       873
        4.       874
        5.       875
    4.     876
      1.      877
        1.       878
        2.       879
        3.       880
        4.       881
        5.       882
      2.      883
        1.       884
        2.       885
    5.     886
      1.      887
        1.       888
        2.       889
        3.       890
        4.       891
      2.      892
      3.      893
        1.       894
        2.       895
      4.      896
        1.       897
          1.        898
            1.         899
            2.         900
          2.        901
          3.        902
          4.        903
          5.        904
        2.       905
        3.       906
        4.       907
        5.       908
        6.       909
      5.      910
        1.       911
        2.       912
        3.       913
        4.       914
        5.       915
        6.       916
    6.     917
      1.      918
        1.       919
          1.        920
        2.       921
        3.       922
        4.       923
      2.      924
    7.     925
      1.      926
      2.      927
    8.     928
      1.      929
      2.      930
      3.      931
      4.      932
      5.      933
      6.      934
      7.      935
      8.      936
        1.       937
        2.       938
        3.       939
        4.       940
      9.      941
        1.       942
        2.       943
        3.       944
      10.      945
        1.       946
        2.       947
        3.       948
        4.       949
        5.       950
      11.      951
        1.       952
        2.       953
        3.       954
        4.       955
        5.       956
      12.      957
      13.      958
      14.      959
      15.      960
      16.      961
      17.      962
    9.     963
      1.      964
    10.     965
      1.      966
      2.      967
        1.       968
          1.        969
        2.       970
        3.       971
      3.      972
      4.      973
        1.       974
        2.       975
      5.      976
        1.       977
        2.       978
          1.        979
        3.       980
          1.        981
          2.        982
        4.       983
          1.        984
          2.        985
        5.       986
          1.        987
          2.        988
          3.        989
      6.      990
        1.       991
        2.       992
    11.     993
      1.      994
      2.      995
      3.      996
  27.   997

Legacy Advertiser

At the start of an advertiser operation of any kind, the radio CPU waits for the start trigger, then programs the frequency based on the channel parameter of the command structure. The channel parameter is not allowed to be in the range of 0–36, because these are data channels. The radio CPU sets up the advertising channel access address and uses the CRC initialization value of 0x55 5555. The whitener is set up as defined in the whitening parameter. The radio CPU then configures the transmitter. Except for an advertiser that is not connectable, the operation goes on with reception after transmission, and if a SCAN_REQ is received, another transmission of a SCAN_RSP may occur.

In Bluetooth low energy mode, advertising is usually done over all three advertising channels. To set this up, three command structures can be chained using the pNextOp parameter. Typically, the parameter and output structures can be the same for all channels.

The first packet transmitted is always an ADV*_IND packet. This packet consists of a header, an advertiser address, and advertising data (except for the ADV_DIRECT_IND packet that is used in directed advertising). The radio CPU constructs these packets as follows (the ADV_DIRECT_IND packet is described in Section 26.8.8.2).

  • In the header, the PDU Type bits are as shown in Table 26-132.
  • The TXAdd bit is as shown in pParams->advConfig.deviceAddrType.
  • The length is calculated from the size of the advertising data, meaning that it is pParams->advLen + 6.
  • The RXAdd bit is not used and is 0, along with the RFU bits.
  • The payload starts with the 6-byte device address, which are read from pParams->pDeviceAddress.
  • The rest of the payload is read from the pParams->pAdvData buffer (if pParams->advLen is nonzero).
Table 26-132 PDU Types for Different Advertiser Commands
CommandType of Advertising PacketValue of PDU Type Bits in Header
CMD_BLE_ADVADV_IND0000b
CMD_BLE_ADV_DIRADV_DIRECT_IND0001b
CMD_BLE_ADV_NCADV_NONCONN_IND0010b
CMD_BLE_ADV_SCANADV_SCAN_IND0110b

Except for the nonconnectable advertiser, the receiver shall be started after the ADV*_IND packet is transmitted. Depending on the type of advertiser operation, the receiver shall listen for a SCAN_REQ and (or) a CONNECT_IND (known as CONNECT_REQ in Bluetooth 4.0, 4.1, and 4.2 Specifications listed in Related Documentation). If the demodulator obtains sync, the header shall be checked when it is received, and if it is not a SCAN_REQ or CONNECT_IND message, the demodulator shall be stopped immediately.

A SCAN_REQ or CONNECT_IND message is received into the RX queue given by pParams->pRxQ, as described in Section 26.10.4.1. The bCrcErr and bIgnore bits are set according to the CRC result and the received message. The AdvA field in the message and the TxAdd bit of the received header are compared to the pParams->pDeviceAddress array and pParams->advConfig.deviceAddrType, respectively, to see if the message was addressed to this advertiser. Then, depending on the advertising filter policy that is given by pParams->advConfig.advFilterPolicy, the received ScanA or InitA field, along with the RxAdd bit of the received header, is checked against the whitelist (see Section 26.8.14), except for a directed advertiser, where the received header is compared against the peer address (see Section 26.8.8.2). If the resolvable private address (RPA) mode (given by pParams->advConfig.rpaMode) is nonzero, an extra check is done to see if the peer address is a resolvable private address. If the received TxAdd is 1 and the two most significant bits of the received ScanA or InitA field are 01b, the address is a RPA. If so, a whitelist check is performed regardless of the filter policy. Depending on the received packet, the actions taken shall be as given in Table 26-133, where the definition of each action (including the value that will be used on bCrcErr and bIgnore) is given in Table 26-134. If pParams->advConfig.bStrictLenFilter is 1, only length fields that are compliant with the Bluetooth low energy specification shall be considered valid. For a SCAN_REQ, that means a length field of 12, and for a CONNECT_IND it means a length field of 34. If pParams->advConfig.bStrictLenFilter is 0, all received packets with a length field less than or equal to the maximum length of an advertiser packet shall be considered valid. If the length is not valid, the receiver shall be stopped.

Table 26-133 Actions to Take Based on Received Packets for Advertisers
PDU TypeCRC ResultAdv. TypeValid LengthAdvA Matches Own AddressFilter PolicyRPA ModeResolvable Private AddressScanA or InitA Present in WhitelistAction No.
SCAN_REQOKC, SYesNoXXXX1
SCAN_REQOKC, SYesYes1 or 3XXNo1
SCAN_REQOKC, SYesYes1 or 3XXYes2
SCAN_REQOKC, SYesYes0 or 20XX2
SCAN_REQOKC, SYesYes0 or 21NoX2
SCAN_REQOKC, SYesYes0 or 21YesNo1
SCAN_REQOKC, SYesYes0 or 21YesYes2
SCAN_REQNOKC, SYesXXXXX3
SCAN_REQXC, SNoXXXXX5
SCAN_REQXDXXXXXX5
CONNECT_INDOKC, DYesNoXXXX1
CONNECT_INDOKC, DYesYes2 or 3XXNo1
CONNECT_INDOKC, DYesYes2 or 3XXYes4
CONNECT_INDOKC, DYesYes0 or 10XX4
CONNECT_INDOKC, DYesYes0 or 11NoX4
CONNECT_INDOKC, DYesYes0 or 11YesNo1
CONNECT_INDOKC, DYesYes0 or 11YesYes4
CONNECT_INDNOKC, DYesXXXXX3
CONNECT_INDXC, DNoXXXXX5
CONNECT_INDXSXXXXXX5
OtherXXXN/AXXN/AN/A5
No packet receivedN/AXN/AN/AXXN/AN/A5

 

Table 26-134 Descriptions of the Actions to Take on Received Packets
Action No.bCrcErrbIgnoreDescription
101End operation with BLE_DONE_OK status
200Transmit SCAN_RSP message
310End operation with BLE_DONE_RXERR status
400End operation with BLE_DONE_CONNECT or BLE_DONE_CONNECT_CHSEL0 status
5Stop receiver immediately and end operation with BLE_DONE_NOSYNC status

 

If a SCAN_REQ packet is received with a length of 12 (or less), it shall be viewed as an empty packet. This means that if pParams->rxConfig.bAutoflushEmpty is 1 and bCrcErr and bIgnore are both 0, the packet is removed from the RX buffer. If a packet is flagged by bIgnore or bCrcErr, it may also be removed based on the bits in pParams->rxConfig.

If the packet being received did not fit in the RX queue, the packet is received to the end, but the received bytes are not stored. If the packet would normally not have been discarded from the RX queue based on the bits in pParams->rxConfig, the command shall end.

If a CONNECT_IND packet is correctly received (see Action 4 in Table 26-134) and pParams->advConfig.chSel is 1, the ChSel bit of the received header is checked. If this bit is 0 (meaning that the peer does not support Channel Selection Algorithm 2), the status is set to BLE_DONE_CONNECT_CHSEL0 instead of to BLE_DONE_CONNECT.

If the next action (according to Table 26-133 and Table 26-134) is to transmit a SCAN_RSP packet, the radio CPU shall start the transmitter to transmit this packet. This packet consists of a header, an advertiser address, and advertising data.

The radio CPU shall construct these packets as follows:

  • In the header, the PDU Type bits shall be 0100b.
  • The TxAdd bit shall be as in pParams->advConfig.deviceAddrType.
  • The length shall be calculated from the size of the scan response data, meaning that it shall be pParams->scanRspLen + 6.
  • The RxAdd and ChSel bits are not used and shall be 0.
  • The RFU bit shall be 0.
  • The payload shall start with the 6-byte device address, which shall be read from pParams->pDeviceAddress.
  • The rest of the payload shall be read from the pParams->pScanRspData buffer.
  • After the SCAN_RSP is transmitted, the command shall end.

A trigger to end the operation is set up by pParams->endTrigger. If the trigger that is defined by this parameter occurs, the radio operation shall continue to completion, but the status code after ending shall be BLE_DONE_ENDED and the result shall be FALSE. This trigger can be used to stop execution instead of proceeding with the next chained operation by use of the condition in the command structure. If the immediate command CMD_STOP is received by the radio CPU, it shall have the same meaning as when the end trigger occurs (except that the status code after ending shall be CMD_DONE_STOPPED).

The output structure pOutput contains fields that give information on the command being run. The radio CPU shall not initialize the fields, so this must be done by the system CPU when a reset of the counters is desired. The fields shall be updated by the radio CPU as described in the following list. The list also indicates when interrupts shall be raised in the system CPU.

  • When the ADV*_IND packet is transmitted, nTxAdvInd is incremented and a Tx_Done interrupt is raised.
  • If a SCAN_RSP packet is transmitted, nTxScanRsp is incremented afterward, and a Tx_Done interrupt is raised.
  • If a SCAN_REQ packet is received with CRC OK and the bIgnore flag cleared, nRxScanReq is incremented. If the payload length is 12 or less, an Rx_Empty interrupt is raised. If the payload length is greater than 12, an Rx_Ok interrupt is raised.
  • If a CONNECT_IND packet is received with CRC OK and the bIgnore flag cleared, nRxConnectReq is incremented and an Rx_OK interrupt is raised.
  • If a packet is received with a CRC error, nRxNok is incremented and an Rx_Nok interrupt is raised.
  • If a packet is received and the bIgnore flag is set, nRxIgnored is incremented and an Rx_Ignored interrupt is raised.
  • If a packet is received that did not fit in the RX queue, nRxBufFull is incremented and an Rx_Buf_Full interrupt is raised.
  • If a packet is received, lastRssi is set to the RSSI of that packet.
  • If a packet is received, timeStamp is set to a timestamp of the start of that packet. For a CONNECT_IND packet, this can be used to calculate the anchor point of the first packet.
  • If the first RX data entry in the RX queue changed state to Finished after a packet was received, an Rx_Entry_Done interrupt is raised.