Programming Examples
6-32
ADSP-BF59x Blackfin Processor Hardware Reference
Transition to Sleep Mode or Deep Sleep Mode
Listing 6-3
and
Listing 6-4
provide code for transitioning from the full-on
operating mode to sleep or deep sleep mode in C and Blackfin assembly
code, respectively.
Listing 6-3. Transitioning to Sleep Mode or Deep Sleep Mode (C)
void sleep(void)
{
ADI_SYSCTRL_VALUES sleep;
bfrom_SysControl(SYSCTRL_EXTVOLTAGE | SYSCTRL_PLLCTL |
SYSCTRL_READ, &sleep, NULL);
sleep.uwPllCtl |= STOPCK;
/* either: Sleep Mode */
sleep.uwPllCtl |= PDWN;
/* or: Deep Sleep Mode */
bfrom_SysControl(SYSCTRL_WRITE | SYSCTRL_EXTVOLTAGE |
SYSCTRL_PLLCTL, &sleep, NULL);
return;
}
Listing 6-4. Transitioning to Sleep Mode or Deep Sleep Mode (ASM)
__sleep:
link sizeof(ADI_SYSCTRL_2;
[--SP] = (R7:0,P5:0);
SP += -12;
R0 = (SYSCTRL_READ | SYSCTRL_EXTVOLTAGE |
SYSCTRL_PLLCTL);
R1 = FP;
R1 += -sizeof(ADI_SYSCTRL_VALUES);
R2 = 0 (z);
IMM32(P4,BFROM_SYSCONTROL);
Summary of Contents for ADSP-BF59x Blackfin
Page 64: ...Development Tools 1 22 ADSP BF59x Blackfin Processor Hardware Reference...
Page 74: ...Processor Specific MMRs 2 10 ADSP BF59x Blackfin Processor Hardware Reference...
Page 244: ...Programming Examples 6 40 ADSP BF59x Blackfin Processor Hardware Reference...
Page 700: ...Programming Examples 16 78 ADSP BF59x Blackfin Processor Hardware Reference...
Page 738: ...Boundary Scan Architecture B 8 ADSP BF59x Blackfin Processor Hardware Reference...