Programming Examples
18-26
ADSP-BF537 Blackfin Processor Hardware Reference
RTC Alarm to Come Out of Hibernate State
sets up the RTC to utilize the alarm feature to come out of
hibernate state. This code assumes that the prescaler has already been
properly enabled.
Listing 18-3. Setting RTC Alarm to Exit Hibernate State
Hibernate_Code:
P0.H = HI(RTC_ALARM);
P0.L = LO(RTC_ALARM);
R0 = 0x0010(Z);
/* set alarm to 16 seconds from now */
W[P0] = R0.L;
P0.L = LO(RTC_STAT);
R0 = 0;
/* Clear RTC Status to Start Counting at 0 */
W[P0] = R0.L;
P0.L = LO(RTC_ICTL);
R0 = ALARM(Z);
W[P0] = R0.L;
/* enable Alarm interrupt */
P0.L = LO(RTC_ISTAT);
R0 = 0x807F(Z);
W[P0] = R0.L;
/* clear any pending RTC interrupts */
R0 = WRITE_COMPLETE(Z);
Poll_WC1:
R1 = W[P0](Z);
R1 = R1 & R0;
/* wait for Write Complete */
CC = AZ;
IF CC JUMP Poll_WC1;
/* RTC now running with correct RTC status */
GoToHibernate:
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 ...