工具与软件:
调试时、我在中断服务函数中添加2个断点。
我继续执行程序、程序在第一个断点停止、永不会到达第二个断点。
我进入程序、它可以到达 第二个断点。
我单步执行程序、它仅 在第一个断点处停止。
如果我删除第一个 断点、 程序 将到达 第二个断点。
如果我删除这两者、 程序运行良好。
原因是什么? 如何解决此问题??
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具与软件:
调试时、我在中断服务函数中添加2个断点。
我继续执行程序、程序在第一个断点停止、永不会到达第二个断点。
我进入程序、它可以到达 第二个断点。
我单步执行程序、它仅 在第一个断点处停止。
如果我删除第一个 断点、 程序 将到达 第二个断点。
如果我删除这两者、 程序运行良好。
原因是什么? 如何解决此问题??
我 在 ISR 末尾清除 EPWM 中断、并且断点正常工作。
但还有另一个问题:
我使用自嵌套中断、请参阅 AM2634:AM263是否支持自中断嵌套? -基于 Arm 的微控制器论坛-基于 Arm 的微控制器- TI E2E 支持论坛
如果我 在 ISR 结束时清除 ePWM 中断标志、那么 在嵌套 ISR 时、每62.5us (中断周期)就无法清除 ePWM 中断标志。
我的中断服务函数如下所示:
void HosSched_Isr(void)
{
for(;;)
{
hos_uiTaskSchedCnt = (hos_uiTaskSchedCnt + 1) & 0x000f;
hos_uiTimeTick62us++;
HosSched_Task62us();
// !!!! ATTENTION this task is only used by auto tuning
// test on 125us task
// only called if schedule counter taskSchedCnt = 1, 3, 5, 7, 9, 11, 13, 15
if (hos_uiTaskSchedCnt & 0x0001)
{
HosSched_Task125us();
}
// test on 250us task
// only called if schedule counter taskSchedCnt = 0, 4, 8, 12
if ((hos_uiTaskSchedCnt & 0x0003) == 0)
{
HosSched_Task250us();
}
else
{
break;
}
// Test if 1ms task has to be called
// 1ms task is only called if schedule counter taskSchedCnt = 0, 1, 2, 3
// Note: 1ms task is called only once if one of the 4 items is valid.
// This is achieved by the 'break' instruction in the else-path of the
// 250us task.
if ((hos_uiTaskSchedCnt & 0x000c) == 0)
{
HosSched_Task1ms();
}
break;
}
clearPwmIntFlag();
}
如果 Sched_Task 62us ()和 Sched_Task 62us ()的运行时间超过62.5us ,它将清除一次中断标志,但它 需要两次中断 才能完成其余的 Sched_Task 621.us ()的运行程序 。
这就是 我在 ISR‘s 清除 ePWM 中断标志的原因。
自嵌套程序测试现在正常。 如果我 在 ISR 末尾清除 EPWM 中断、是否会出现一些意外问题?
尊敬的 Xiaxue:
我和专家们谈过这件事、结论是:
如何在 AM263x 中实现同样的结果? [报价]遗憾的是、到目前为止、这是一个限制。 C2000器件具有不同的 CPU、因此中断管理器与 AM26x 器件中使用的 R5F 不同。
此致、
Akshit