第二个问题,的确这三种DSP都是用这个头文件,但我想问的是这些头文件里面怎么跟单片机不一样,没有硬件地址的定义的,像单片机51会把它的端口地址定义在头文件中,但cdefBF533.h里却只有问题中复制出来的几句,如下面就是从该头文件中复制出来的
/************************************************************************
*
* cdefBF533.h
*
* (c) Copyright 2002-2003 Analog Devices, Inc. All rights reserved.
*
************************************************************************/
#ifndef _CDEFBF533_H
#define _CDEFBF533_H
#include <cdefBF532.h>
#endif /* _CDEFBF533_H */
cdefBF532.h这个文件里包含了
“/************************************************************************
*
* cdefBF532.h
*
* (c) Copyright 2001-2010 Analog Devices, Inc. All rights reserved.
*
************************************************************************/
#ifndef _CDEF_BF532_H
#define _CDEF_BF532_H
#if !defined(__ADSPLPBLACKFIN__)
#warning cdefBF532.h should only be included for 532 compatible chips.
#endif
/* include all Core registers and bit definitions */
#include <defBF532.h>
”
你查看一下,最终是关联到defBF532.h里面。打开defBF532.h文件,你就会发现比如说
“#define PLL_CTL 0xFFC00000 /* PLL Control register (16-bit) */
#define PLL_DIV 0xFFC00004 /* PLL Divide Register (16-bit) */
#define VR_CTL 0xFFC00008 /* Voltage Regulator Control Register (16-bit) */
#define PLL_STAT 0xFFC0000C /* PLL Status register (16-bit) */
#define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count register (16-bit) */
#define CHIPID 0xFFC00014 /* Chip ID Register”
你想要的映射的硬件地址就在这里头了。