该代码实现了 两次下载法在dspC6713平台上 烧写flash的操作过程

源代码在线查看: c6711_intr.c.bak

软件大小: 636 K
上传用户: billhu
关键词: flash dspC 6713 代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				/*****************************************************************************
				* File name :     C6711_INTERRUPT.c
				* Description:
				******************************************************************************/
				#ifndef MASTER_FILE
				#define C6711_GLOBALS
				//#include "includes.h"
				#endif
				#include "edma.h"
				#include "INTR.H"
				extern unsigned int framecnt;
				extern unsigned char flage,flag8,flag9,flag6;
				
				/*******************************************************************************
				*                     Function     prototypes
				*******************************************************************************/
				
				
				/******************************************************************************
				* function    : intr_init()
				* description : Interrupt initialization
				******************************************************************************/
				void intr_init(void)
				{
				 INTR_MAP_RESET(); /* Set Interrupt Mapping*/
				// CSR=0x101;
				// IER=0x4010;       /* Enable INT4 *///4112
				// ICR=0xffff;       /* clear all pending interrupts  */
				 //(*(unsigned int *)(0xA00004F4))=0x80008;
				 
				  CSR=0x100;                           /* Disable all interrupts              */
				  IER=1;                               /* Disable all interrupts except NMI   */
				  ICR=0xffff;                          /* Clear all pending interrupts        */
				}
				
				/******************************************************************************
				* function    : External_Interrupt4
				* description : INT_04#,PCI interrupt service program.
				******************************************************************************/
				interrupt void External_Interrupt4(void)
				{
						unsigned int dst_addr,temp;
						unsigned int buffer_addr1=0xB000FFC0;//相机寄存器设置
					//	unsigned int src_addr =0xb000F800;
						
						temp=IFR;
						ICR=temp;       /* clear all pending interrupts  */
						IER=0x4103; 
						*(unsigned int *)(buffer_addr1+20) = 0x00000001;//jin zhi zhong duan xin hao 	
					 //	*(volatile unsigned int *) CIPR = 0xffff;
					 	*(volatile unsigned int *) CIPR = 0x0010;
						
					 	dst_addr=0x80500000+0x800*framecnt;
					 /*	for(i=0;i					 		{
					 		 temp=*(volatile unsigned int *)(src_addr+i);
					 		 *(volatile unsigned int *)(dst_addr+i)=temp;
					 		 
					 		 }*/
					 	EDMA4_channel(dst_addr);
					 	EDMA_Set(4);  //会不会这个还没有传递完就启动8号通道了 
					//	flage=1;
				
				}
				
				/******************************************************************************
				* function    : External_Interrupt5
				* description : INT_05#
				******************************************************************************/
				interrupt void External_Interrupt5(void)
				{
				  // (*(unsigned int *)(0xA00004F4))=0x80008;
				//   unsigned int temp;
				//   IER=0x4113;
				//   temp=IFR;
				//   ICR=temp; 
				} 
				
				/******************************************************************************
				* function    : External_Interrupt6
				* description : INT_06#
				******************************************************************************/
				interrupt void External_Interrupt6(void)
				{
				   
				} 
				
				/******************************************************************************
				* function    : External_Interrupt7
				* description : INT_07#
				******************************************************************************/
				interrupt void External_Interrupt7(void)
				{
				   
				} 
				
				/******************************************************************************
				* function    : EDMA_Interrupt	(void ) 
				* description : INT_08#,EDMA controller interrupt's handlers
				*               Acts on an interrupt when the EDMA channel issues an interrupt
				******************************************************************************/
				interrupt void EDMA_Interrupt(void)            
				{
				unsigned int temp;//temp_addr,i,oldtemp,dst_addr
				*(volatile unsigned int *) ECR = 0xffff;
				temp=*(volatile unsigned int *) CIPR;
				*(volatile unsigned int *) CIPR = temp;//0xffff;  //清除EDMA事件悬挂reg 必要步骤
														//不可以用0xffff全部清除 否则屏蔽掉 8 9了 
				if(temp&0x0010)
					{
						flage=1;
					//	temp=IFR;
						ICR=0xffff;       /* clear all pending interrupts  */
					//	IER=0x4113;
					}
					
				else if(temp&0x0040)
					
					 flag6=1; 
					 
				else if(temp&0x0100)
					
					 flag8=1; 
					 
					 
					
				else if(temp&0x0200)
					flag9=1; 
					
				}
				/******************************************************************************
				* function    : McBsp_Receive0_Interrupt   
				* description : INT_9#
				******************************************************************************/
				interrupt void McBsp_Receive0_Interrupt( void)    
				{
				   
				}  
				
				/******************************************************************************
				* function    : EMIF_SDRAM_Timer_Interrupt(void )      
				* description : INT_10#
				******************************************************************************/
				interrupt void EMIF_SDRAM_Timer_Interrupt(void )
				{
				  
				}	
				
				/******************************************************************************
				* function    : McBsp_Receive1_Interrupt   
				* description : INT_11#
				******************************************************************************/
				interrupt void McBsp_Receive1_Interrupt(void)   
				{
				   
				}   
				
				/******************************************************************************
				* function    : Illegal_Interrupt (void)
				* description : INT_12#
				*               Called whenever an interrupt occures that is not set ok or an error situation                                                             
				*               has occured. This interrupt handler should never execute.                                                             
				*               But is here for debugging purposes
				******************************************************************************/
				interrupt void Illegal_Interrupt(void)
				{
				   /* Illegal interrupts shall never be called */
				
				}	
				
				/******************************************************************************
				* function    : HostPortInterrupt(void )      DSPINT
				* description : INT_13#,HostPortInterrupt interrupt handler
				*               Acts on an interrupt when the Host issues an interrupt
				******************************************************************************/
				interrupt void HostPortInterrupt(void)          
				{
				  
				}	
				
				
				/**********************************************************************************************************
				* FUNCTION NAME: TimerZero                                           
				* Description  : INT_14#
				**********************************************************************************************************/
				
				void interrupt TimerZero(void)      /* Interrupt 14 */
				{
				 
				    
				}
				
				/******************************************************************************
				* function    : TimerOne(void ) 
				* description : INT_15#                                                          
				******************************************************************************/
				
				interrupt void TimerOne(void)   /* Interrupt 15*/
				{
				//printf("PCI memory 0x%x data is\n");
				}	
				
				
				/* END OF FILE */
				
				
							

相关资源