11 System Design
The flags are bidirectional pins, each with the same functionality. To
program the direction of each flag pin, the following control bits in the
MODE2 register are used:
MODE2
Bit
Name
15
FLG0O
16
FLG1O
17
FLG2O
18
FLG3O
At reset, the MODE2 register is cleared, configuring all the flags as
inputs.
11.2.5.1 Flag Inputs
When a flag pin is programmed as an input, its value is stored in a bit
in the ASTAT register. The bit is updated in each cycle with the input
value from the pin. Flag inputs can be asynchronous to the
ADSP-2106x clock, so there is a one-cycle delay before a change on the
pin appears in ASTAT (if the rising edge of the input misses the setup
requirement for that cycle).
ASTAT
Bit
Name
19
FLG0
20
FLG1
21
FLG2
22
FLG3
An ASTAT flag bit is read-only if the flag is configured as an input.
Otherwise, the bit is readable and writeable. The ASTAT flag bit states
are conditions you can specify in conditional instructions.
Note that when an interrupt service routine causes ASTAT to be
pushed onto the status stack, the flag bits in ASTAT are not affected;
the values of these bits carry over from the main program to the
service routine and from the service routine back to the main program
(i.e. status stack pop).
(See "Status Stack Save & Restore" in the "Interrupts" section of the
Program Sequencing chapter for further details.)
11 – 12
www.BDTIC.com/ADI
Definition
FLAG0 direction (1=output, 0=input)
FLAG1 direction (1=output, 0=input)
FLAG2 direction (1=output, 0=input)
FLAG3 direction (1=output, 0=input)
Definition
FLAG0 value
FLAG1 value
FLAG2 value
FLAG3 value
Need help?
Do you have a question about the ADSP-2106x SHARC and is the answer not in the manual?
Questions and answers