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

CPU_DWT Registers

#CPU_DWT_CPU_DWT_MAP1_TABLE_1 lists the memory-mapped registers for the CPU_DWT registers. All register offset addresses not listed in #CPU_DWT_CPU_DWT_MAP1_TABLE_1 should be considered as reserved locations and the register contents should not be modified.

Complex bit access types are encoded to fit into small table cells. #CPU_DWT_CPU_DWT_MAP1_LEGEND shows the codes that are used for access types in this section.

Table 3-34 CPU_DWT Access Type Codes
Access TypeCodeDescription
Read Type
RRRead
Write Type
WWWrite
Reset or Default Value
-nValue after reset or the default value

3.9.1.1 CTRL Register (Offset = 0h) [Reset = 40000000h]

CTRL is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_CTRL_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_CTRL_TABLE.

Return to the Summary Table.

Control
Use the DWT Control Register to enable the DWT unit.

Figure 3-5 CTRL Register
3130292827262524
RESERVEDNOCYCCNTNOPRFCNT
R/W-10hR/W-0hR/W-0h
2322212019181716
RESERVEDCYCEVTENAFOLDEVTENALSUEVTENASLEEPEVTENAEXCEVTENACPIEVTENAEXCTRCENA
R/W-0hR/W-0hR/W-0hR/W-0hR/W-0hR/W-0hR/W-0hR/W-0h
15141312111098
RESERVEDPCSAMPLEENASYNCTAPCYCTAPPOSTCNT
R/W-0hR/W-0hR/W-0hR/W-0hR/W-0h
76543210
POSTCNTPOSTPRESETCYCCNTENA
R/W-0hR/W-0hR/W-0h
Table 3-35 CTRL Register Field Descriptions
BitFieldTypeResetDescription
31-26RESERVEDR/W10hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
25NOCYCCNTR/W0hWhen set, CYCCNT is not supported.
24NOPRFCNTR/W0hWhen set, FOLDCNT, LSUCNT, SLEEPCNT, EXCCNT, and CPICNT are not supported.
23RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
22CYCEVTENAR/W0hEnables Cycle count event. Emits an event when the POSTCNT counter triggers it. See CYCTAP and POSTPRESET for details. This event is only emitted if PCSAMPLEENA is disabled. PCSAMPLEENA overrides the setting of this bit.
0: Cycle count events disabled
1: Cycle count events enabled
21FOLDEVTENAR/W0hEnables Folded instruction count event. Emits an event when FOLDCNT overflows (every 256 cycles of folded instructions). A folded instruction is one that does not incur even one cycle to execute. For example, an IT instruction is folded away and so does not use up one cycle.
0: Folded instruction count events disabled.
1: Folded instruction count events enabled.
20LSUEVTENAR/W0hEnables LSU count event. Emits an event when LSUCNT overflows (every 256 cycles of LSU operation). LSU counts include all LSU costs after the initial cycle for the instruction.
0: LSU count events disabled.
1: LSU count events enabled.
19SLEEPEVTENAR/W0hEnables Sleep count event. Emits an event when SLEEPCNT overflows (every 256 cycles that the processor is sleeping).
0: Sleep count events disabled.
1: Sleep count events enabled.
18EXCEVTENAR/W0hEnables Interrupt overhead event. Emits an event when EXCCNT overflows (every 256 cycles of interrupt overhead).
0x0: Interrupt overhead event disabled.
0x1: Interrupt overhead event enabled.
17CPIEVTENAR/W0hEnables CPI count event. Emits an event when CPICNT overflows (every 256 cycles of multi-cycle instructions).
0: CPI counter events disabled.
1: CPI counter events enabled.
16EXCTRCENAR/W0hEnables Interrupt event tracing.
0: Interrupt event trace disabled.
1: Interrupt event trace enabled.
15-13RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
12PCSAMPLEENAR/W0hEnables PC Sampling event. A PC sample event is emitted when the POSTCNT counter triggers it. See CYCTAP and POSTPRESET for details. Enabling this bit overrides CYCEVTENA.
0: PC Sampling event disabled.
1: Sampling event enabled.
11-10SYNCTAPR/W0hSelects a synchronization packet rate. CYCCNTENA and CPU_ITM:TCR.SYNCENA must also be enabled for this feature.
Synchronization packets (if enabled) are generated on tap transitions (0 to1 or 1 to 0).

0h = Disabled. No synchronization packets

1h = Tap at bit 24 of CYCCNT

2h = Tap at bit 26 of CYCCNT

3h = Tap at bit 28 of CYCCNT

9CYCTAPR/W0hSelects a tap on CYCCNT. These are spaced at bits [6] and [10]. When the selected bit in CYCCNT changes from 0 to 1 or 1 to 0, it emits into the POSTCNT, post-scalar counter. That counter then counts down. On a bit change when post-scalar is 0, it triggers an event for PC sampling or cycle count event (see details in CYCEVTENA).

0h = Selects bit [6] to tap

1h = Selects bit [10] to tap

8-5POSTCNTR/W0hPost-scalar counter for CYCTAP. When the selected tapped bit changes from 0 to 1 or 1 to 0, the post scalar counter is down-counted when not 0. If 0, it triggers an event for PCSAMPLEENA or CYCEVTENA use. It also reloads with the value from POSTPRESET.
4-1POSTPRESETR/W0hReload value for post-scalar counter POSTCNT. When 0, events are triggered on each tap change (a power of 2). If this field has a non-0 value, it forms a count-down value, to be reloaded into POSTCNT each time it reaches 0. For example, a value 1 in this register means an event is formed every other tap change.
0CYCCNTENAR/W0hEnable CYCCNT, allowing it to increment and generate synchronization and count events. If NOCYCCNT = 1, this bit reads zero and ignore writes.

3.9.1.2 CYCCNT Register (Offset = 4h) [Reset = 00000000h]

CYCCNT is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_CYCCNT_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_CYCCNT_TABLE.

Return to the Summary Table.

Current PC Sampler Cycle Count
This register is used to count the number of core cycles. This counter can measure elapsed execution time. This is a free-running counter (this counter will not advance in power modes where free-running clock to CPU stops). The counter has three functions:
1: When CTRL.PCSAMPLEENA = 1, the PC is sampled and emitted when the selected tapped bit changes value (0 to 1 or 1 to 0) and any post-scalar value counts to 0.
2: When CTRL.CYCEVTENA = 1 , (and CTRL.PCSAMPLEENA = 0), an event is emitted when the selected tapped bit changes value (0 to 1 or 1 to 0) and any post-scalar value counts to 0.
3: Applications and debuggers can use the counter to measure elapsed execution time. By subtracting a start and an end time, an application can measure time between in-core clocks (other than when Halted in debug). This is valid to 232 core clock cycles (for example, almost 89.5 seconds at 48MHz).

Figure 3-6 CYCCNT Register
313029282726252423222120191817161514131211109876543210
CYCCNT
R/W-0h
Table 3-36 CYCCNT Register Field Descriptions
BitFieldTypeResetDescription
31-0CYCCNTR/W0hCurrent PC Sampler Cycle Counter count value. When enabled, this counter counts the number of core cycles, except when the core is halted. The cycle counter is a free running counter, counting upwards (this counter will not advance in power modes where free-running clock to CPU stops). It wraps around to 0 on overflow. The debugger must initialize this to 0 when first enabling.

3.9.1.3 CPICNT Register (Offset = 8h) [Reset = X]

CPICNT is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_CPICNT_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_CPICNT_TABLE.

Return to the Summary Table.

CPI Count
This register is used to count the total number of instruction cycles beyond the first cycle.

Figure 3-7 CPICNT Register
313029282726252423222120191817161514131211109876543210
RESERVEDCPICNT
R/W-0hR/W-X
Table 3-37 CPICNT Register Field Descriptions
BitFieldTypeResetDescription
31-8RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
7-0CPICNTR/WXCurrent CPI counter value. Increments on the additional cycles (the first cycle is not counted) required to execute all instructions except those recorded by LSUCNT. This counter also increments on all instruction fetch stalls. If CTRL.CPIEVTENA is set, an event is emitted when the counter overflows. This counter initializes to 0 when it is enabled using CTRL.CPIEVTENA.

3.9.1.4 EXCCNT Register (Offset = Ch) [Reset = X]

EXCCNT is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_EXCCNT_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_EXCCNT_TABLE.

Return to the Summary Table.

Exception Overhead Count
This register is used to count the total cycles spent in interrupt processing.

Figure 3-8 EXCCNT Register
313029282726252423222120191817161514131211109876543210
RESERVEDEXCCNT
R/W-0hR/W-X
Table 3-38 EXCCNT Register Field Descriptions
BitFieldTypeResetDescription
31-8RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
7-0EXCCNTR/WXCurrent interrupt overhead counter value. Counts the total cycles spent in interrupt processing (for example entry stacking, return unstacking, pre-emption). An event is emitted on counter overflow (every 256 cycles). This counter initializes to 0 when it is enabled using CTRL.EXCEVTENA.

3.9.1.5 SLEEPCNT Register (Offset = 10h) [Reset = X]

SLEEPCNT is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_SLEEPCNT_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_SLEEPCNT_TABLE.

Return to the Summary Table.

Sleep Count
This register is used to count the total number of cycles during which the processor is sleeping.

Figure 3-9 SLEEPCNT Register
313029282726252423222120191817161514131211109876543210
RESERVEDSLEEPCNT
R/W-0hR/W-X
Table 3-39 SLEEPCNT Register Field Descriptions
BitFieldTypeResetDescription
31-8RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
7-0SLEEPCNTR/WXSleep counter. Counts the number of cycles during which the processor is sleeping. An event is emitted on counter overflow (every 256 cycles). This counter initializes to 0 when it is enabled using CTRL.SLEEPEVTENA. Note that the sleep counter is clocked using CPU's free-running clock. In some power modes the free-running clock to CPU is gated to minimize power consumption. This means that the sleep counter will be invalid in these power modes.

3.9.1.6 LSUCNT Register (Offset = 14h) [Reset = X]

LSUCNT is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_LSUCNT_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_LSUCNT_TABLE.

Return to the Summary Table.

LSU Count
This register is used to count the total number of cycles during which the processor is processing an LSU operation beyond the first cycle.

Figure 3-10 LSUCNT Register
313029282726252423222120191817161514131211109876543210
RESERVEDLSUCNT
R/W-0hR/W-X
Table 3-40 LSUCNT Register Field Descriptions
BitFieldTypeResetDescription
31-8RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
7-0LSUCNTR/WXLSU counter. This counts the total number of cycles that the processor is processing an LSU operation. The initial execution cost of the instruction is not counted. For example, an LDR that takes two cycles to complete increments this counter one cycle. Equivalently, an LDR that stalls for two cycles (i.e. takes four cycles to execute), increments this counter three times. An event is emitted on counter overflow (every 256 cycles). This counter initializes to 0 when it is enabled using CTRL.LSUEVTENA.

3.9.1.7 FOLDCNT Register (Offset = 18h) [Reset = X]

FOLDCNT is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FOLDCNT_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FOLDCNT_TABLE.

Return to the Summary Table.

Fold Count
This register is used to count the total number of folded instructions. The counter increments on each instruction which takes 0 cycles.

Figure 3-11 FOLDCNT Register
313029282726252423222120191817161514131211109876543210
RESERVEDFOLDCNT
R/W-0hR/W-X
Table 3-41 FOLDCNT Register Field Descriptions
BitFieldTypeResetDescription
31-8RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
7-0FOLDCNTR/WXThis counts the total number folded instructions. This counter initializes to 0 when it is enabled using CTRL.FOLDEVTENA.

3.9.1.8 PCSR Register (Offset = 1Ch) [Reset = X]

PCSR is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_PCSR_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_PCSR_TABLE.

Return to the Summary Table.

Program Counter Sample
This register is used to enable coarse-grained software profiling using a debug agent, without changing the currently executing code. If the core is not in debug state, the value returned is the instruction address of a recently executed instruction. If the core is in debug state, the value returned is 0xFFFFFFFF.

Figure 3-12 PCSR Register
313029282726252423222120191817161514131211109876543210
EIASAMPLE
R-X
Table 3-42 PCSR Register Field Descriptions
BitFieldTypeResetDescription
31-0EIASAMPLERXExecution instruction address sample, or 0xFFFFFFFF if the core is halted.

3.9.1.9 COMP0 Register (Offset = 20h) [Reset = X]

COMP0 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_COMP0_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_COMP0_TABLE.

Return to the Summary Table.

Comparator 0
This register is used to write the reference value for comparator 0.

Figure 3-13 COMP0 Register
313029282726252423222120191817161514131211109876543210
COMP
R/W-X
Table 3-43 COMP0 Register Field Descriptions
BitFieldTypeResetDescription
31-0COMPR/WXReference value to compare against PC or the data address as given by FUNCTION0. Comparator 0 can also compare against the value of the PC Sampler Counter (CYCCNT).

3.9.1.10 MASK0 Register (Offset = 24h) [Reset = X]

MASK0 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_MASK0_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_MASK0_TABLE.

Return to the Summary Table.

Mask 0
Use the DWT Mask Registers 0 to apply a mask to data addresses when matching against COMP0.

Figure 3-14 MASK0 Register
313029282726252423222120191817161514131211109876543210
RESERVEDMASK
R/W-0hR/W-X
Table 3-44 MASK0 Register Field Descriptions
BitFieldTypeResetDescription
31-4RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
3-0MASKR/WXMask on data address when matching against COMP0. This is the size of the ignore mask. That is, DWT matching is performed as:(ADDR ANDed with (0xFFFF left bit-shifted by MASK)) == COMP0. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP0 is 3, this matches a word access of 0, because 3 would be within the word.

3.9.1.11 FUNCTION0 Register (Offset = 28h) [Reset = 00000000h]

FUNCTION0 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FUNCTION0_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FUNCTION0_TABLE.

Return to the Summary Table.

Function 0
Use the DWT Function Registers 0 to control the operation of the comparator 0. This comparator can:
1. Match against either the PC or the data address. This is controlled by CYCMATCH. This function is only available for comparator 0 (COMP0).
2. Emit data or PC couples, trigger the ETM, or generate a watchpoint depending on the operation defined by FUNCTION.

Figure 3-15 FUNCTION0 Register
3130292827262524
RESERVEDMATCHED
R-0hR/W-0h
2322212019181716
RESERVED
R-0h
15141312111098
RESERVED
R-0h
76543210
CYCMATCHRESERVEDEMITRANGERESERVEDFUNCTION
R/W-0hR-0hR/W-0hR-0hR/W-0h
Table 3-45 FUNCTION0 Register Field Descriptions
BitFieldTypeResetDescription
31-25RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
24MATCHEDR/W0hThis bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
23-8RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
7CYCMATCHR/W0hThis bit is only available in comparator 0. When set, COMP0 will compare against the cycle counter (CYCCNT).
6RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
5EMITRANGER/W0hEmit range field. This bit permits emitting offset when range match occurs. PC sampling is not supported when emit range is enabled.
This field only applies for: FUNCTION = 1, 2, 3, 12, 13, 14, and 15.
4RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
3-0FUNCTIONR/W0hFunction settings.
0x0: Disabled
0x1: EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM
0x2: EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.
0x3: EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.
0x4: Watchpoint on PC match.
0x5: Watchpoint on read.
0x6: Watchpoint on write.
0x7: Watchpoint on read or write.
0x8: ETM trigger on PC match
0x9: ETM trigger on read
0xA: ETM trigger on write
0xB: ETM trigger on read or write
0xC: EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) for read transfers
0xD: EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) for write transfers
0xE: EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) + data for read transfers
0xF: EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) + data for write transfers
Note 1: If the ETM is not fitted, then ETM trigger is not possible.
Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst.
Note 3: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.

3.9.1.12 COMP1 Register (Offset = 30h) [Reset = X]

COMP1 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_COMP1_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_COMP1_TABLE.

Return to the Summary Table.

Comparator 1
This register is used to write the reference value for comparator 1.

Figure 3-16 COMP1 Register
313029282726252423222120191817161514131211109876543210
COMP
R/W-X
Table 3-46 COMP1 Register Field Descriptions
BitFieldTypeResetDescription
31-0COMPR/WXReference value to compare against PC or the data address as given by FUNCTION1.
Comparator 1 can also compare data values. So this register can contain reference values for data matching.

3.9.1.13 MASK1 Register (Offset = 34h) [Reset = X]

MASK1 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_MASK1_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_MASK1_TABLE.

Return to the Summary Table.

Mask 1
Use the DWT Mask Registers 1 to apply a mask to data addresses when matching against COMP1.

Figure 3-17 MASK1 Register
313029282726252423222120191817161514131211109876543210
RESERVEDMASK
R/W-0hR/W-X
Table 3-47 MASK1 Register Field Descriptions
BitFieldTypeResetDescription
31-4RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
3-0MASKR/WXMask on data address when matching against COMP1. This is the size of the ignore mask. That is, DWT matching is performed as:(ADDR ANDed with (0xFFFF left bit-shifted by MASK)) == COMP1. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP1 is 3, this matches a word access of 0, because 3 would be within the word.

3.9.1.14 FUNCTION1 Register (Offset = 38h) [Reset = 00000200h]

FUNCTION1 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FUNCTION1_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FUNCTION1_TABLE.

Return to the Summary Table.

Function 1
Use the DWT Function Registers 1 to control the operation of the comparator 1. This comparator can:
1. Perform data value comparisons if associated address comparators have performed an address match. This function is only available for comparator 1 (COMP1).
2. Emit data or PC couples, trigger the ETM, or generate a watchpoint depending on the operation defined by FUNCTION.

Figure 3-18 FUNCTION1 Register
3130292827262524
RESERVEDMATCHED
R-0hR/W-0h
2322212019181716
RESERVEDDATAVADDR1
R-0hR/W-0h
15141312111098
DATAVADDR0DATAVSIZELNK1ENADATAVMATCH
R/W-0hR/W-0hR-1hR/W-0h
76543210
RESERVEDEMITRANGERESERVEDFUNCTION
R-0hR/W-0hR-0hR/W-0h
Table 3-48 FUNCTION1 Register Field Descriptions
BitFieldTypeResetDescription
31-25RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
24MATCHEDR/W0hThis bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
23-20RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
19-16DATAVADDR1R/W0hIdentity of a second linked address comparator for data value matching when DATAVMATCH == 1 and LNK1ENA == 1.
15-12DATAVADDR0R/W0hIdentity of a linked address comparator for data value matching when DATAVMATCH == 1.
11-10DATAVSIZER/W0hDefines the size of the data in the COMP1 register that is to be matched:
0x0: Byte
0x1: Halfword
0x2: Word
0x3: Unpredictable.
9LNK1ENAR1hRead only bit-field only supported in comparator 1.
0: DATAVADDR1 not supported
1: DATAVADDR1 supported (enabled)
8DATAVMATCHR/W0hData match feature:
0: Perform address comparison
1: Perform data value compare. The comparators given by DATAVADDR0 and DATAVADDR1 provide the address for the data comparison. The FUNCTION setting for the comparators given by DATAVADDR0 and DATAVADDR1 are overridden and those comparators only provide the address match for the data comparison.
This bit is only available in comparator 1.
7-6RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
5EMITRANGER/W0hEmit range field. This bit permits emitting offset when range match occurs. PC sampling is not supported when emit range is enabled.
This field only applies for: FUNCTION = 1, 2, 3, 12, 13, 14, and 15.
4RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
3-0FUNCTIONR/W0hFunction settings:
0x0: Disabled
0x1: EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM
0x2: EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.
0x3: EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.
0x4: Watchpoint on PC match.
0x5: Watchpoint on read.
0x6: Watchpoint on write.
0x7: Watchpoint on read or write.
0x8: ETM trigger on PC match
0x9: ETM trigger on read
0xA: ETM trigger on write
0xB: ETM trigger on read or write
0xC: EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) for read transfers
0xD: EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) for write transfers
0xE: EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) + data for read transfers
0xF: EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) + data for write transfers
Note 1: If the ETM is not fitted, then ETM trigger is not possible.
Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst.
Note 3: FUNCTION is overridden for comparators given by DATAVADDR0 and DATAVADDR1 if DATAVMATCH is also set. The comparators given by DATAVADDR0 and DATAVADDR1 can then only perform address comparator matches for comparator 1 data matches.
Note 4: If the data matching functionality is not included during implementation it is not possible to set DATAVADDR0, DATAVADDR1, or DATAVMATCH. This means that the data matching functionality is not available in the implementation. Test the availability of data matching by writing and reading DATAVMATCH. If it is not settable then data matching is unavailable.
Note 5: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.

3.9.1.15 COMP2 Register (Offset = 40h) [Reset = X]

COMP2 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_COMP2_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_COMP2_TABLE.

Return to the Summary Table.

Comparator 2
This register is used to write the reference value for comparator 2.

Figure 3-19 COMP2 Register
313029282726252423222120191817161514131211109876543210
COMP
R/W-X
Table 3-49 COMP2 Register Field Descriptions
BitFieldTypeResetDescription
31-0COMPR/WXReference value to compare against PC or the data address as given by FUNCTION2.

3.9.1.16 MASK2 Register (Offset = 44h) [Reset = X]

MASK2 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_MASK2_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_MASK2_TABLE.

Return to the Summary Table.

Mask 2
Use the DWT Mask Registers 2 to apply a mask to data addresses when matching against COMP2.

Figure 3-20 MASK2 Register
313029282726252423222120191817161514131211109876543210
RESERVEDMASK
R/W-0hR/W-X
Table 3-50 MASK2 Register Field Descriptions
BitFieldTypeResetDescription
31-4RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
3-0MASKR/WXMask on data address when matching against COMP2. This is the size of the ignore mask. That is, DWT matching is performed as:(ADDR ANDed with (0xFFFF left bit-shifted by MASK)) == COMP2. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP2 is 3, this matches a word access of 0, because 3 would be within the word.

3.9.1.17 FUNCTION2 Register (Offset = 48h) [Reset = 00000000h]

FUNCTION2 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FUNCTION2_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FUNCTION2_TABLE.

Return to the Summary Table.

Function 2
Use the DWT Function Registers 2 to control the operation of the comparator 2. This comparator can emit data or PC couples, trigger the ETM, or generate a watchpoint depending on the operation defined by FUNCTION.

Figure 3-21 FUNCTION2 Register
3130292827262524
RESERVEDMATCHED
R/W-0hR/W-0h
2322212019181716
RESERVED
R-0h
15141312111098
RESERVED
R-0h
76543210
RESERVEDEMITRANGERESERVEDFUNCTION
R-0hR/W-0hR-0hR/W-0h
Table 3-51 FUNCTION2 Register Field Descriptions
BitFieldTypeResetDescription
31-25RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
24MATCHEDR/W0hThis bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
23-6RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
5EMITRANGER/W0hEmit range field. This bit permits emitting offset when range match occurs. PC sampling is not supported when emit range is enabled.
This field only applies for: FUNCTION = 1, 2, 3, 12, 13, 14, and 15.
4RESERVEDR0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
3-0FUNCTIONR/W0hFunction settings.
0x0: Disabled
0x1: EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM
0x2: EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.
0x3: EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.
0x4: Watchpoint on PC match.
0x5: Watchpoint on read.
0x6: Watchpoint on write.
0x7: Watchpoint on read or write.
0x8: ETM trigger on PC match
0x9: ETM trigger on read
0xA: ETM trigger on write
0xB: ETM trigger on read or write
0xC: EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) for read transfers
0xD: EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) for write transfers
0xE: EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) + data for read transfers
0xF: EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) + data for write transfers
Note 1: If the ETM is not fitted, then ETM trigger is not possible.
Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst.
Note 3: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.

3.9.1.18 COMP3 Register (Offset = 50h) [Reset = X]

COMP3 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_COMP3_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_COMP3_TABLE.

Return to the Summary Table.

Comparator 3
This register is used to write the reference value for comparator 3.

Figure 3-22 COMP3 Register
313029282726252423222120191817161514131211109876543210
COMP
R/W-X
Table 3-52 COMP3 Register Field Descriptions
BitFieldTypeResetDescription
31-0COMPR/WXReference value to compare against PC or the data address as given by FUNCTION3.

3.9.1.19 MASK3 Register (Offset = 54h) [Reset = X]

MASK3 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_MASK3_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_MASK3_TABLE.

Return to the Summary Table.

Mask 3
Use the DWT Mask Registers 3 to apply a mask to data addresses when matching against COMP3.

Figure 3-23 MASK3 Register
313029282726252423222120191817161514131211109876543210
RESERVEDMASK
R/W-0hR/W-X
Table 3-53 MASK3 Register Field Descriptions
BitFieldTypeResetDescription
31-4RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
3-0MASKR/WXMask on data address when matching against COMP3. This is the size of the ignore mask. That is, DWT matching is performed as:(ADDR ANDed with (0xFFFF left bit-shifted by MASK)) == COMP3. However, the actual comparison is slightly more complex to enable matching an address wherever it appears on a bus. So, if COMP3 is 3, this matches a word access of 0, because 3 would be within the word.

3.9.1.20 FUNCTION3 Register (Offset = 58h) [Reset = 00000000h]

FUNCTION3 is shown in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FUNCTION3_FIGURE and described in #CPU_DWT_CPU_DWT_MAP1_CPU_DWT_ALL_FUNCTION3_TABLE.

Return to the Summary Table.

Function 3
Use the DWT Function Registers 3 to control the operation of the comparator 3. This comparator can emit data or PC couples, trigger the ETM, or generate a watchpoint depending on the operation defined by FUNCTION.

Figure 3-24 FUNCTION3 Register
3130292827262524
RESERVEDMATCHED
R/W-0hR/W-0h
2322212019181716
RESERVED
R/W-0h
15141312111098
RESERVED
R/W-0h
76543210
RESERVEDEMITRANGERESERVEDFUNCTION
R/W-0hR/W-0hR/W-0hR/W-0h
Table 3-54 FUNCTION3 Register Field Descriptions
BitFieldTypeResetDescription
31-25RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
24MATCHEDR/W0hThis bit is set when the comparator matches, and indicates that the operation defined by FUNCTION has occurred since this bit was last read. This bit is cleared on read.
23-6RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
5EMITRANGER/W0hEmit range field. This bit permits emitting offset when range match occurs. PC sampling is not supported when emit range is enabled.
This field only applies for: FUNCTION = 1, 2, 3, 12, 13, 14, and 15.
4RESERVEDR/W0hSoftware should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior.
3-0FUNCTIONR/W0hFunction settings.
0x0: Disabled
0x1: EMITRANGE = 0, sample and emit PC through ITM. EMITRANGE = 1, emit address offset through ITM
0x2: EMITRANGE = 0, emit data through ITM on read and write. EMITRANGE = 1, emit data and address offset through ITM on read or write.
0x3: EMITRANGE = 0, sample PC and data value through ITM on read or write. EMITRANGE = 1, emit address offset and data value through ITM on read or write.
0x4: Watchpoint on PC match.
0x5: Watchpoint on read.
0x6: Watchpoint on write.
0x7: Watchpoint on read or write.
0x8: ETM trigger on PC match
0x9: ETM trigger on read
0xA: ETM trigger on write
0xB: ETM trigger on read or write
0xC: EMITRANGE = 0, sample data for read transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) for read transfers
0xD: EMITRANGE = 0, sample data for write transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) for write transfers
0xE: EMITRANGE = 0, sample PC + data for read transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) + data for read transfers
0xF: EMITRANGE = 0, sample PC + data for write transfers. EMITRANGE = 1, sample Daddr (lower 16 bits) + data for write transfers
Note 1: If the ETM is not fitted, then ETM trigger is not possible.
Note 2: Data value is only sampled for accesses that do not fault (MPU or bus fault). The PC is sampled irrespective of any faults. The PC is only sampled for the first address of a burst.
Note 3: PC match is not recommended for watchpoints because it stops after the instruction. It mainly guards and triggers the ETM.