搜索
bottom↓
回复: 2

T2CINT中断进不去,请教高手~~

[复制链接]

出0入0汤圆

发表于 2009-8-18 20:55:27 | 显示全部楼层 |阅读模式
// Initialize System Control registers, PLL, WatchDog, Clocks to default state:
// This function is found in the DSP281x_SysCtrl.c file.
InitSysCtrl();

// HISPCP prescale register settings, normally it will be set to default values
    EALLOW;   // This is needed to write to EALLOW protected registers
    SysCtrlRegs.HISPCP.all = 0x0000;     // SYSCLKOUT/1  
    EDIS;   // This is needed to disable write to EALLOW protected registers

// Disable and clear all CPU interrupts:
    DINT;
    IER = 0x0000;
    IFR = 0x0000;

// Initialize Pie Control Registers To Default State
// This function is found in the DSP281x_PieCtrl.c file.
    InitPieCtrl();

// Initialize the PIE Vector Table To a Known State:
// This function is found in DSP281x_PieVect.c.
// This function populates the PIE vector table with pointers
// to the shell ISR functions found in DSP281x_DefaultIsr.c.
    InitPieVectTable();        
        
// User specific functions, Reassign vectors (optional), Enable Interrupts:
        
// Initialize EVA Timer 1:
// Setup Timer 1 Registers (EV A)
    EnableFlag=TRUE;
   // Waiting for enable flag set
   while (EnableFlag==FALSE)
    {
      BackTicker++;
    }
   

//Enable Comper interrupt bits for GP timer 2
    EvaRegs.EVAIMRB.bit.T2CINT=1;
    EvaRegs.EVAIFRB.bit.T2CINT=1;

// Reassign ISRs.
        // Reassign the PIE vector for T1UFINT and T2PINT to point to a different
        // ISR then the shell routine found in DSP281x_DefaultIsr.c.
        // This is done if the user does not want to use the shell ISR routine
        // but instead wants to use their own ISR.
        
        EALLOW;        // This is needed to write to EALLOW protected registers
        PieVectTable.T2CINT = &HXISR;
        EDIS;   // This is needed to disable write to EALLOW protected registers

// Enable PIE group 3 interrupt 1 for T2CINT
    PieCtrlRegs.PIEIER3.all=M_INT2;

// Enable CPU INT2 for T1UFINT and INT3 for T2CINT:
    IER |=M_INT3;
请问高手,我这个中断程序为什么,T2的比较中断进不去啊?谢谢~~

阿莫论坛20周年了!感谢大家的支持与爱护!!

一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。

出0入0汤圆

发表于 2009-8-19 08:32:23 | 显示全部楼层
没有看到你启动EV的定时器呀?你参考一下2812的例程里面有和这个一样的例子。

出0入0汤圆

 楼主| 发表于 2009-8-19 16:00:43 | 显示全部楼层
我不启动EV用他的周期中断,下溢中断都是可以连续进的啊?
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-25 11:19

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表