| |||
| Home > Programmers’ Model > Using ETM event resources > Examples of event and resource programming | |||
Example 3.1 shows how to encode an event to occur when in address range 3 and when counter 2 reaches zero.
Example 3.1. Encoding an event based on a combination of resources
bits [16:14] select the Boolean A AND B function, b010
Resource B is defined as an address range comparator, b001, for range 3, b0010
Resource A is counter, b100, number 2, b0001.
Example 3.2 shows how to encode an event to occur when sequencer state 3 is reached.
Example 3.2. Encoding an event based on a single resource
bits [16:14] select the Boolean A function, b000
Resource A is defined as sequencer, b101, state 3, b0010.
The event is active when the Boolean expression is TRUE.
Because the selected Boolean function does not use Resource B, the value of the Resource B register field is ignored.