⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arm_boot.h

📁 ARM嵌入式应用系统开发典型实例.rar
💻 H
字号:
//============================================================================
// Filename:     arm_boot.h
//
// Description:  This file contains the functions prototypes and definitions
// to load and start the DSP.
//
// Copyright (C) 2000 - 2002 Texas Instruments Incorporated
//
// Revision History:
//
//============================================================================


#ifndef _ARM_BOOT_H_
#define _ARM_BOOT_H_

// Physical Chip Specific Addresses 
#define ARM_API_MEM_START   (0xFFE00000)
#define DSP_API_MEM_START   (0x2000)

// A helper macro to convert a DSP API address into an ARM API address.  
// Note that DSP adresses are in words while ARM addresses are in bytes
#define MAP_DSP_TO_ARM(dsp_address) \
                 (ARM_API_MEM_START + (dsp_address - DSP_API_MEM_START) * 2)


// API transfer buffer address (DSP addresses)
#define API_BUF_START       0x3900
#define API_BUF_END         0x3F80
// API transfer buffer size (in 16-bit words)
#define API_BUF_LENGTH      (API_BUF_END - API_BUF_START) 

// ARM addresses used for hand-shaking flags
#define DSP_READY           MAP_DSP_TO_ARM(0x3800)
#define PROG_BUF_READY      (DSP_READY + 1*2)
#define DATA_BUF_READY      (DSP_READY + 2*2)
#define COPY_DONE           (DSP_READY + 3*2)
#define PMST                (DSP_READY + 4*2)

// Set by DSP when it begins running its main app
#define DSP_RUNNING         (DSP_READY + 5*2)

// Input from ARM to DSP: a long count
// Output from DSP to ARM: the factorial of the count
// (both must be aligned on even word addresses)
#define DSP_INPUT           (DSP_READY + 8*2)
#define DSP_OUTPUT          (DSP_READY + 12*2)


// Timeout value to give up on DSP loading code (10 sec)
#define TIME_OUT_COUNT		   (10000000)

#define LOAD_OK         (0)
#define LOAD_TIME_OUT	(1)


typedef struct {
    const unsigned short *pprogram;
    const unsigned short *pdata;
    const unsigned short  pmst;
} dsp_app_struct;

extern unsigned long factorial;

extern void resetinterrupts(void);
extern void pll_init(unsigned long ARM_Freq, unsigned long DSP_Freq);
extern void setup_api_interrupt(void);
extern void setupstacks(void);

extern int  dsp_load(dsp_app_struct *pDsp_App);
extern void dsp_start(void);

#endif /* _ARM_BOOT_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -