Booting Process
19-24
ADSP-BF537 Blackfin Processor Hardware Reference
L
Programs must be sure to save all processor registers modified by
INIT code and to restore them before the INIT code returns. At a
minimum, it is recommended that every INIT code saves the
ASTAT
,
RETS
, and the
Rx
and
Px
registers used in the INIT code.
The INIT code can perform push and pop operations through the
stack pointer
SP
. The boot kernel provides sufficient stack space in
scratchpad memory (0xFFB0 0000 – 0xFFB0 0FFF).
shows an example INIT code file that demonstrates the setup
of the SDRAM controller.
Listing 19-4. Example INIT Code (SDRAM Controller Setup)
#include <defBF537.h>
.section program;
/*******************************************/
[--SP] = ASTAT;
// Save registers onto Stack
[--SP] = RETS;
[--SP] = (R7:0);
[--SP] = (P5:0);
/*******************************************/
/*******INIT Code Section*******************/
/*******SDRAM Setup************/
Setup_SDRAM:
P0.L = LO(EBIU_SDRRC);
P0.H = HI(EBIU_SDRRC);
// SDRAM Refresh Rate Control Register
R0 = 0x074A(Z);
W[P0] = R0;
SSYNC;
P0.L = LO(EBIU_SDBCTL);
P0.H = HI(EBIU_SDBCTL);// SDRAM Memory Bank Control Register
R0 = EBCAW_8|EBSZ_16|EBE(Z);//This is just an example!
W[P0] = R0;
SSYNC;
Summary of Contents for Blackfin ADSP-BF537
Page 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Page 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...