在5509A的中断实验例程中,采用的是硬件中断
其程序为
/* This is an example for EMIF of C5509 */
/*—————————————————————————-*/
#include <csl.h>
#include <csl_irq.h>#include <csl_pll.h>
#include <csl_emif.h>
#include <csl_chip.h>
#include <stdio.h>
CSLBool b;
Uint16 eventId0;
int old_intm;interrupt void int1(void);
//———Function prototypes———/* Reference start of interrupt vector table *//* This symbol is defined in file, vectors_IP.s55 */extern void VECSTART(void);
/*锁相环的设置*/
PLL_Config myConfig = {
0, //IAI: the PLL locks using the same process that was underway //before the idle mode was entered
1, //IOB: If the PLL indicates a break in the phase lock, //it switches to its bypass mode and restarts the PLL phase-locking //sequence
12, //PLL multiply value; multiply 12 times
1 //Divide by 2 PLL divide value; it can be either PLL divide value //(when PLL is enabled), or Bypass-mode divide value
//(PLL in bypass mode, if PLL multiply value is set to 1)
};
/***************5509A中断设置,使能INT1中断***********************/
/*参考资料: TMS320C55x Chip Support Library API Reference Guide (Rev. J)
TMS320VC5509A Data Sheet */
void INTconfig()
{
/* Temporarily disable all maskable interrupts */ IRQ_setVecs((Uint32)(&VECSTART));
/* Temporarily disable all maskable interrupts */ old_intm = IRQ_globalDisable();
/* Get Event Id associated with External INT0(8019), for use with */
eventId0 = IRQ_EVT_INT0;
/* Clear any pending INT0 interrupts */ IRQ_clear(eventId0);
/* Place interrupt service routine address at */ /* associated vector location */ IRQ_plug(eventId0,&int1);
/* Enable INT0(8019) interrupt */ IRQ_enable(eventId0);
/* Enable all maskable interrupts */ IRQ_globalEnable();}
main()
{
/*初始化CSL库*/ CSL_init();
/*EMIF为全EMIF接口*/
CHIP_RSET(XBSR,0x0a01);
/*设置系统的运行速度为144MHz*/
PLL_config(&myConfig);
//设置并使能5509A芯片的INT0中断(EXINT中断)
INTconfig();
while(1);
}
//External INT0(EXINT)中断处理函数
interrupt void int1()
{
printf("EXINT ouccers\n");
}
/******************************************************************************\
* End of pll2.c
\******************************************************************************/
在开发板上,按下EXINT键,表明有一个硬件中断发生,并且EXINT与INT0引脚也没有连接,那程序中为什么采用的是INT0中断,它与EXINT中断有何关系?
Shine:
请问你用的是哪块开发板?中断实验例程具体叫什么名字?
meng yang2:
回复 Shine:
应用的是TMS320VC5509开发板,一个实验叫外部中断实验,另一个叫UART通信实验中的MCBSP软件模拟异步通信实验。
Shine:
回复 meng yang2:
请问你指的是5509EVM板么?http://c5000.spectrumdigital.com/evm5509a/docs/evm5509a_plus_techref.pdfEXTINT键指的是S4这个wakeup键么?
meng yang2:
回复 Shine:
不是,我用的是5509的开发板,不是EVM版,它的电路图如下所示:
EXINT中断与INT0中断有何联系?
meng yang2:
回复 Shine:
不是extint是EXINT键,在原理图右上角就是啊,按键K1、K2、K3、K4下面就是S6即EXINT键。那我问问厂家吧。