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.

[参考译文] TMS320F280025:禁用并在稍后重新启用观察点(由软件声明)

Guru**** 2562120 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1109284/tms320f280025-disable-and-later-reenable-watchpoint-claimed-by-software

器件型号:TMS320F280025

您好!

我使用应用手册/应用报告"TMS320C28xDSP 上的在线堆栈溢出检测"来监控堆栈。 我还在使用无损 RAM 检查(来自诊断库)。 当然、当 RAM 检查正在检查堆栈所在的 RAM 时、堆栈溢出检测会在存储器被写入时触发。

因此、我想在存储器检查之前禁用观察点、稍后再重新启用它。 很遗憾、我找不到有关"分析块"及其工作原理的详细信息。 我获得的唯一信息来自应用手册本身。

基于我尝试过以下操作:

#define WP_EVT_CNTL (volatile unsigned int *)0x0000084E // WP0 EVT_CNTL register addr
void DisableStackOverflow()
{
    *WP_EVT_CNTL = 0x001; // Write 0x0001 to EVT_CNTL to disable watchpoint
    // of the watchpoint
    asm(" RPT #1 || NOP"); // Wait at least 3 cycles for the write to occur
}



void ReenableStackOverflow()
{
    *WP_EVT_CNTL = 0x002; // Write 0x0002 to EVT_CNTL to enable watchpoint
    // of the watchpoint
    asm(" RPT #1 || NOP"); // Wait at least 3 cycles for the write to occur
}

但是、这不起作用:
尽管我在 RAM 检查之前调用 DisableStackOverflow(),但我仍然收到 RTOSINT。

有人能给我指出我需要的文档吗? 或者告诉我这是否完全可行?

非常感谢、
Andreas

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Andreas:

    让我与软件团队核实一下。 有人会在接下来的几天内回复您。

    此致、

    Nirav

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Andreas:

    很抱歉耽误你的时间。 不确定这是否是正确的顺序、将检查并返回是否有更好的处理方法。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大家好、

    我也再次查看了、我找到了该解决方案:

    #define WP_EVT_CNTL (volatile unsigned int *)0x0000084E // WP0 EVT_CNTL register addr
    void DisableStackOverflow()
    {
        // Enable EALLOW protected register access
        asm(" EALLOW");
    
        *WP_EVT_CNTL = 0x001; // Write 0x0001 to EVT_CNTL to disable watchpoint
        // of the watchpoint
        asm(" RPT #1 || NOP"); // Wait at least 3 cycles for the write to occur
    
        // Successful Return
        asm(" EDIS");
    }
    
    
    
    void ReenableStackOverflow()
    {
        // Enable EALLOW protected register access
        asm(" EALLOW");
    
        *WP_EVT_CNTL = 0x080A; // Write 0x0002 to EVT_CNTL to enable watchpoint
        // of the watchpoint
        asm(" RPT #1 || NOP"); // Wait at least 3 cycles for the write to occur
    
        // Successful Return
        asm(" EDIS");
    }

    因此、基本上我首先错过了 EALLOW、而且您必须重新启用观察点 、同时再次写入其配置。

    如果为分析块提供适当的文件,这两个问题都可以避免。

    此致、
    Andreas