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.

[参考译文] TMS320F28379D:如何检测 TMS320F28379D 上的硬复位?

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1478984/tms320f28379d-how-to-detect-a-hard-reset-on-tms320f28379d

器件型号:TMS320F28379D
主题中讨论的其他器件:TMS320F28377D

工具与软件:

尊敬的 TI 您好:

我有一位客户要求我调查他们的产品。 它们使用 TMS320F28377D 、并且似乎正在进行重置、它们无法通过 CAN 检测到重置。

我连接了 A JTAG 探针 来监控代码执行、我注意到了 eCAP 计数器不超过1000 、即使它是计时的 200 MHz 这让我怀疑 A 硬复位 .

我开发了一个代码来监控此行为、但由于发生了复位、我不确定是否成功捕获了它。 下面是我开发的代码:

#pragma DATA_SECTION(por_count, ".TI.ramfunc");
#pragma DATA_SECTION(xrsn_count, ".TI.ramfunc");
#pragma DATA_SECTION(wdrsn_count, ".TI.ramfunc");
#pragma DATA_SECTION(nmiwdrsn_count, ".TI.ramfunc");
#pragma DATA_SECTION(hwbistn_count, ".TI.ramfunc");
#pragma DATA_SECTION(hibresetn_count, ".TI.ramfunc");
#pragma DATA_SECTION(sccresetn_count, ".TI.ramfunc");

volatile Uint16 por_count = 0;
volatile Uint16 xrsn_count = 0;
volatile Uint16 wdrsn_count = 0;
volatile Uint16 nmiwdrsn_count = 0;
volatile Uint16 hwbistn_count = 0;
volatile Uint16 hibresetn_count = 0;
volatile Uint16 sccresetn_count = 0;

void check_reset_cause(void)
{
    Uint16 reset_cause = HWREGH(0x80); // Lire le registre RESC

    // Vérifier chaque bit et incrémenter le compteur correspondant
    if (reset_cause & 0x0001) por_count++;
    if (reset_cause & 0x0002) xrsn_count++;
    if (reset_cause & 0x0004) wdrsn_count++;
    if (reset_cause & 0x0008) nmiwdrsn_count++;
    if (reset_cause & 0x0020) hwbistn_count++;
    if (reset_cause & 0x0040) hibresetn_count++;
    if (reset_cause & 0x0100) sccresetn_count++;

    // Effacer les bits de reset pour éviter les faux positifs
    HWREGH(0x80) = reset_cause;
}

我如何在知道 eCAP 计数器不超过1000且我怀疑存在硬复位的情况下可靠地检测 TMS320F28377D 上的复位?

感谢你的评分  

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

    尊敬的 UserHomeInit:


    请检查 RESC 寄存器、它可以将复位信息保存在 Xrsn 上

    复位类型为 POR、因此只能在下电上电时擦除。

    您不需要编写代码、而是只需在 CCS 的寄存器视图中读取寄存器

    谢谢