Programming Examples - Analog Devices Blackfin ADSP-BF537 Hardware Reference Manual

Hide thumbs Also See for Blackfin ADSP-BF537:
Table of Contents

Advertisement

Programming Examples

Listing 17-1
shows how to configure the watchdog timer so that it resets
the chip when it expires. At startup, the code evaluates whether the recent
reset event has been caused by the watchdog. Additionally, the example
sets the
NOBOOT
Listing 17-1. Watchdog Timer Configuration
#include <defBF534.h>
#define WDOGPERIOD 0x00200000
.section L1_code;
.global _reset;
_reset:
...
/* optionally, test whether reset was caused by watchdog */
p0.h=hi(SWRST);
p0.l=lo(SWRST);
r6 = w[p0] (z);
CC = bittst(r6, bitpos(RESET_WDOG));
if !CC jump _reset.no_watchdog_reset;
/* optionally, warn at system level or host device here */
_reset.no_watchdog_reset:
/* optionally, set NOBOOT bit to avoid reboot in case */
p0.h=hi(SYSCR);
p0.l=lo(SYSCR);
r0 = w[p0](z);
bitset(r0,bitpos(NOBOOT));
w[p0] = r0;
ADSP-BF537 Blackfin Processor Hardware Reference
bit to prevent the memory from being rebooted.
Watchdog Timer
17-9

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Blackfin ADSP-BF537 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents