User manual

EMU3 emulator features UM0036
316/385 Doc ID 7705 Rev 11
Figure 249. Programming level 1
Example 3: Setting the trigger output high or low
In the previous example, upon each occurrence of a specific event (an opcode fetch at
sample.c, line 170) the trigger is toggled—meaning that the new trigger value is the
opposite of the old trigger value. Toggling changes the relative value of the trigger.
In this example, we show that we can also effectively toggle the trigger high or low using the
set high and set low options. The advantage of toggling in this way is that you can set a
specific trigger value upon the occurrence of a particular event.
This is advantageous if you are not sure of the order in which events occur during the
running of your application.
Imagine that we have an external device attached to our input probe and we want to make
certain that an output signal of value “1” is sent from Output Trigger 1 every time we receive
a positive signal value from the input trigger.
However, at the same time, if our application enters an interrupt loop, we want this event to
override all else and send a signal of value “0” from Output Trigger 1.
While neither of these events has occurred, we would also like to send a signal of value “0”
from Output Trigger 1.
Program your Advanced Breakpoints
window as summarized in Table 83.