Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.233

Configure Cortex-M DWT Data Comparator on Cortex-M

In this topic:

Introduction

Compare on Address on Data Access

Compare on Address Range on Data Access

Compare on Address and Data Value on Data Access

Compare on Address Range and Data Value on Data Access

Compare on Address 1 or Address 2 and Data Value

Compare on Address 1 range or Address 2 range and Data value

 

 

Introduction

Each comparator can be configured for a specific address or/and for an address range (Address comparators). All comparators have a LSB masking register which implements an ignore mask. The size of the ignore mask is 0-31 bits, applied to address range matching. The range can be specified via Ignore LSB bits drop-down menu.

Comparator 0 can compare against the clock cycle counter (CYCCNT).

Comparator 1 supports data comparison (Data comparator) and linking with another comparator. It can be set to two addresses or/and two ranges, and data value. In this case Comparator 3 and/or 2 are reserved.

 

A full DWT module contains four comparators that you can configure as:

a hardware watchpoint

an ETM trigger

a PC sampler event trigger

a data address sampler event trigger.

 

Note that a more simple configuration is possible via Analyzer Configuration / Profiler page dialog and Profiler Data Area dialog. Follow online tutorial Tracing with BlueBox tools which will guide you through basic configurations.

 

Configure via Profiler Data Area dialog

CortexDWTcomparators

1.Open View / Analyzer / Analyzer Configuration button.

2.Check Profiler in the Analyzer Configuration / Hardware page.

3.Check Data in the Analyzer Configuration / Profiler page.

4.Click New / Trace in Data Areas section.

 

Refer to Data Profiling chapter for more information.

 

 

Manual configuration of ARM Cortex-M Comparator 1

For specific use cases and linking the Comparator 1 winIDEA offers manual configuration of the DWT module.

 

Use cases cover comparing values on Address or/and Data with an option Ignore LSB bits:

1. Address

Compare on Address on Data Access

Compare on Address Range on Data Access

 

2. Address and Data

Compare on Address and Data Value on Data Access

Compare on Address Range and Data Value on Data Access

 

3. Address 1 / Address 2 and Data

Compare on Address 1 or Address 2 and Data value

Compare on Address 1 range or Address 2 range and Data value

 

 

Open the Trigger dialog

Open View / Analyzer and click the Analyzer Configuration button AnalyzerConButton.

 

CortexDWTcomparators1

1.Enable Manual Trigger/Recorder configuration.

2.Make sure Processes, the application you wish to record (e.g. App/ CORE0) and Profiler are enabled.

3.Press Configure.

 

 

Enable and the DWT module and configure Comparator 0

To link Comparator 1 with Comparator 3 and/or Comparator 2, Comparator 0 has to be configured first.

 

CortexDWTcomparators2

Enable the DWT component and configure Comparator 0

1.Open the DWT CORE0 page.

2.Enable Comparator 0.

3.Select Write Access from the drop-down menu.

4.Select an address in the Address field. e.g. iDataTrace.

5.Select sample data value from the Action drop-down menu.

 

 

Use case: Compare on Address

Compare on Address on Data Access

CortexDWTcomparators3

Configure Comparator 1

1.Enable Comparator 1.

2.Select Write Access from the drop-down menu.

3.Enable Address 1 and select and address in the field.

4.Select sample data value from the Action drop-down menu.

 

 

Compare on Address Range on Data Access

CortexDWTcomparators4

Configure Comparator 1 with option Ignore LSB bits

1.Enable Comparator 1.

2.Select Write Access from the drop-down menu.

3.Enable Address 1 and select and address in the field.

4.Select sample data value from the Action drop-down menu.

5.Select a number from the Ignore LSB bits drop-down menu.

 

 

Use case: Compare on Address and Data

Compare on Address and Data Value on Data Access

CortexDWTcomparators5

Configure Comparator 1

1.Enable Comparator 1.

2.Select Write Access from the drop-down menu.

3.Enable Address 1 and select and address in the field.

4.Enable Data and select the HEX value.

5.Select data size from the Data Size drop-down menu.

 

Comparator 3 is reserved.

 

 

Compare on Address Range and Data Value on Data Access

CortexDWTcomparators6

Configure Comparator 1 with option Ignore LSB bits

1.Enable Comparator 1.

2.Select Write Access from the drop-down menu.

3.Enable Address 1 and select and address in the field.

4.Enable Data and select the HEX value.

5.Select data size from the Data Size drop-down menu.

6.Select a number from the Ignore LSB bits drop-down menu.

 

Comparator 3 is reserved.

 

 

Use case: Compare on Address 1 / Address 2 and Data

Compare on Address 1 or Address 2 and Data Value

CortexDWTcomparators7

Configure Comparator 1

1.Enable Comparator 1.

2.Select Write Address from the drop-down menu.

3.Enable Address 1 and select and address in the field.

4.Enable Data and select the HEX value.

5.Select data size from the Data Size drop-down menu.

6.Enable Address 2 and select and address in the field.

 

Comparator 2 and 3 are reserved.

 

 

Compare on Address 1 range or Address 2 range and Data value

Cortex-DWT-Adress1-2

Configure Comparator 1 with Ignore LSB bits

1.Enable Comparator 1.

2.Select Write Address from the drop-down menu.

3.Enable Address 1 and select and an address in the field.

4.Select a number from the Ignore LSB bits drop-down menu for Address 1.

5.Enable Data and select the HEX value.

6.Select data size from the Data Size drop-down menu.

7.Enable Address 2 and select and an address in the field.

8.Select a number from the Ignore LSB bits drop-down menu for Address 2.

 

Comparator 2 and 3 are reserved.

Copyright © 2024 TASKING Germany GmbH