2046|0

2015

帖子

0

TA的资源

纯净的硅(中级)

楼主
 

定位DSP 非法中断 [复制链接]

I use eZdsp F2812 to write a program that use CpuTimer0 interrupt. This interrupt consists of many call function.
This program is store in external memory since is a very long code.
I encounter this error when run it:

interrupt void ILLEGAL_ISR(void)   // Illegal operation TRAP
{
  // Insert ISR Code here

  // Next two lines for debug only to halt the processor here
  // Remove after inserting ISR Code
  asm("          ESTOP0");
  for(;;);

}

If I remove half of the program, then it will run perfectly.
Any idea what is wrong? Is it because my stack size is not enough? My stack size is 0x800.

Appreciate your help.
Thank you.

Regards,
Lin

Hi Lin,

I've found that following ISR handler is easier for debugging such problems. When the CPU halts on ESTOP0 or place the program counter (PC) on NOP and continue executing. The ISR handler should exit and jump(return) to the location that caused TRAP ISR to generate:

Regards, Mitja

void interrupt ILLEGAL_ISR(void)    // Illegal operation TRAP
{
    // Insert ISR Code here
    // Next two lines for debug only to halt the processor here
    asm ("  ESTOP0");
    // in order for code to halt also when not in debug mode
    asm ("  B   $,UNC");
    // place PC here to continue the execution
    asm ("  NOP");
}

点赞 关注
 

回复
举报
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/10 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表