
Programming Examples
4-14
ADSP-BF59x Blackfin Processor Hardware Reference
Listing 4-1. Servicing GPIO Interrupt Request
#include <defBF527.h>
/*ADSP-BF527 product is used as an example*/
.section program;
_portg_a_isr:
/* push used registers */
[--sp] = (r7:7, p5:5);
/* clear interrupt request on GPIO pin PG2 */
/* no matter whether used A or B channel */
p5.l = lo(PORTGIO_CLEAR);
p5.h = hi(PORTGIO_CLEAR);
r7 = PG2;
w[p5] = r7;
/* place user code here */
/* sync system, pop registers and exit */
ssync;
(r7:7, p5:5) = [sp++];
rti;
_portg_a_isr.end:
The W1C instruction shown in this example may require several
SCLK
cycles to complete, depending on system load and instruction history. The
program sequencer does not wait until the instruction completes and con-
tinues program execution immediately. The
SSYNC
instruction ensures that
the W1C command indeed cleared the request in the GPIO peripheral
before the RTI instruction executes. However, the
SSYNC
instruction does
not guarantee that the release of interrupt request has also been recognized
by the CEC controller, which may require a few more
CCLK
cycles depend-
ing on the
CCLK
-to-
SCLK
ratio. In service routines consisting of a few
instructions only, two
SSYNC
instructions are recommended between the
clear command and the RTI instruction. However, one
SSYNC
instruction
is typically sufficient if the clear command performs in the very beginning
Содержание ADSP-BF59x Blackfin
Страница 64: ...Development Tools 1 22 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 74: ...Processor Specific MMRs 2 10 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 204: ...Unique Information for the ADSP BF59x Processor 5 104 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 244: ...Programming Examples 6 40 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 345: ...ADSP BF59x Blackfin Processor Hardware Reference 9 9 Core Timer Unique Information for the ADSP BF59x Processor None...
Страница 346: ...Unique Information for the ADSP BF59x Processor 9 10 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 398: ...Unique Information for the ADSP BF59x Processor 11 42 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 622: ...Unique Information for the ADSP BF59x Processor 15 38 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 700: ...Programming Examples 16 78 ADSP BF59x Blackfin Processor Hardware Reference...
Страница 738: ...Boundary Scan Architecture B 8 ADSP BF59x Blackfin Processor Hardware Reference...