25.12.2012 Views

VisualDSP++ 4.5 Loader and Utilities Manual - Analog Devices

VisualDSP++ 4.5 Loader and Utilities Manual - Analog Devices

VisualDSP++ 4.5 Loader and Utilities Manual - Analog Devices

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ADSP-2126x/2136x/2137x Processor Booting<br />

address when this DMA completes <strong>and</strong><br />

the RTI at 0x80030 is executed. */<br />

IDLE; /* After IDLE, patch then start */<br />

IMASK=0; /* Clear IMASK on way to 0x80004 */<br />

/* ========================================================= */<br />

/* When this final DMA completes, the high-priority SPI interrupt<br />

is latched, which triggers the following chain of events:<br />

1) The IDLE in the delayed branch to completes<br />

2) IMASK is cleared<br />

3) The PC (now 0x80004 due to the “JUMP RESET (db)”) is pushed<br />

on the PC stack <strong>and</strong> the processor vectors to 0x80030 to<br />

service the interrupt.<br />

Meanwhile, the loader (anticipating this sequence) has automatically<br />

inserted an “RTI” instruction at 0x80030. The user<br />

instruction intended for that address is instead placed<br />

in the FINAL_INIT section-header <strong>and</strong> has loaded into PX before<br />

the DMA was initiated.)<br />

4) The processor executes the RTI at 0x80030 <strong>and</strong> vectors to the<br />

address stored on the PC stack (0x80004).<br />

Again, the loader has inserted an instruction into the boot<br />

stream <strong>and</strong> has placed it at 0x40005 (opcode x39732D802000):<br />

R0=R0-R0,DM(I4,M5)=R9,PM(I12,M13)=R11;<br />

This instruction does the following.<br />

A) Restores the power-up value of SYSCTL (held in R11).<br />

B) Overwrites itself with the instruction “PM(0,I8)=PX;”<br />

The first instruction of FINAL_INIT places the opcode for<br />

this new instruction, 0xB16B00000000, into R9.<br />

C) R0=R0-R0 causes the AZ flag to be set.<br />

This satisfies the termination-condition of the loop set up<br />

5-32 <strong>VisualDSP++</strong> <strong>4.5</strong> <strong>Loader</strong> <strong>and</strong> <strong>Utilities</strong> <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!